aQute.lib.json.Handler.encode()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中aQute.lib.json.Handler.encode()方法的一些代码示例,展示了Handler.encode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Handler.encode()方法的具体详情如下:
包路径:aQute.lib.json.Handler
类名称:Handler
方法名:encode

Handler.encode介绍

暂无

代码示例

代码示例来源:origin: biz.aQute.bnd/bndlib

void encode(Encoder app, Object object, Type type, Map<Object,Type> visited) throws Exception {
  // Get the null out of the way
  if (object == null) {
    app.append("null");
    return;
  }
  // If we have no type or the type is Object.class
  // we take the type of the object itself. Normally types
  // come from declaration sites (returns, fields, methods, etc)
  // and contain generic info.
  if (type == null || type == Object.class)
    type = object.getClass();
  // Dispatch to the handler who knows how to handle the given type.
  Handler h = getHandler(type, object.getClass());
  h.encode(app, object, visited);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

void encode(Encoder app, Object object, Type type, Map<Object, Type> visited) throws Exception {
  // Get the null out of the way
  if (object == null) {
    app.append("null");
    return;
  }
  // If we have no type or the type is Object.class
  // we take the type of the object itself. Normally types
  // come from declaration sites (returns, fields, methods, etc)
  // and contain generic info.
  if (type == null || type == Object.class)
    type = object.getClass();
  // Dispatch to the handler who knows how to handle the given type.
  Handler h = getHandler(type, object.getClass());
  h.encode(app, object, visited);
}

代码示例来源:origin: biz.aQute.bnd/bnd

void encode(Encoder app, Object object, Type type, Map<Object,Type> visited) throws Exception {
  // Get the null out of the way
  if (object == null) {
    app.append("null");
    return;
  }
  // If we have no type or the type is Object.class
  // we take the type of the object itself. Normally types
  // come from declaration sites (returns, fields, methods, etc)
  // and contain generic info.
  if (type == null || type == Object.class)
    type = object.getClass();
  // Dispatch to the handler who knows how to handle the given type.
  Handler h = getHandler(type, object.getClass());
  h.encode(app, object, visited);
}

代码示例来源:origin: org.osgi/osgi.enroute.jsonrpc.simple.provider

void encode(Encoder app, Object object, Type type, Map<Object,Type> visited) throws Exception {
  // Get the null out of the way
  if (object == null) {
    app.append("null");
    return;
  }
  // If we have no type or the type is Object.class
  // we take the type of the object itself. Normally types
  // come from declaration sites (returns, fields, methods, etc)
  // and contain generic info.
  if (type == null || type == Object.class)
    type = object.getClass();
  // Dispatch to the handler who knows how to handle the given type.
  Handler h = getHandler(type, object.getClass());
  h.encode(app, object, visited);
}

代码示例来源:origin: org.osgi/osgi.enroute.configurer.simple.provider

void encode(Encoder app, Object object, Type type, Map<Object, Type> visited) throws Exception {
  // Get the null out of the way
  if (object == null) {
    app.append("null");
    return;
  }
  // If we have no type or the type is Object.class
  // we take the type of the object itself. Normally types
  // come from declaration sites (returns, fields, methods, etc)
  // and contain generic info.
  if (type == null || type == Object.class)
    type = object.getClass();
  // Dispatch to the handler who knows how to handle the given type.
  Handler h = getHandler(type, object.getClass());
  h.encode(app, object, visited);
}

代码示例来源:origin: org.osgi/osgi.enroute.dtos.bndlib.provider

void encode(Encoder app, Object object, Type type, Map<Object,Type> visited) throws Exception {
  // Get the null out of the way
  if (object == null) {
    app.append("null");
    return;
  }
  // If we have no type or the type is Object.class
  // we take the type of the object itself. Normally types
  // come from declaration sites (returns, fields, methods, etc)
  // and contain generic info.
  if (type == null || type == Object.class)
    type = object.getClass();
  // Dispatch to the handler who knows how to handle the given type.
  Handler h = getHandler(type, object.getClass());
  h.encode(app, object, visited);
}

代码示例来源:origin: org.osgi/osgi.enroute.rest.simple.provider

void encode(Encoder app, Object object, Type type, Map<Object,Type> visited) throws Exception {
  // Get the null out of the way
  if (object == null) {
    app.append("null");
    return;
  }
  // If we have no type or the type is Object.class
  // we take the type of the object itself. Normally types
  // come from declaration sites (returns, fields, methods, etc)
  // and contain generic info.
  if (type == null || type == Object.class)
    type = object.getClass();
  // Dispatch to the handler who knows how to handle the given type.
  Handler h = getHandler(type, object.getClass());
  h.encode(app, object, visited);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

void encode(Encoder app, Object object, Type type, Map<Object, Type> visited) throws Exception {
  // Get the null out of the way
  if (object == null) {
    app.append("null");
    return;
  }
  // If we have no type or the type is Object.class
  // we take the type of the object itself. Normally types
  // come from declaration sites (returns, fields, methods, etc)
  // and contain generic info.
  if (type == null || type == Object.class)
    type = object.getClass();
  // Dispatch to the handler who knows how to handle the given type.
  Handler h = getHandler(type, object.getClass());
  h.encode(app, object, visited);
}

代码示例来源:origin: org.osgi/osgi.enroute.easse.simple.adapter

void encode(Encoder app, Object object, Type type, Map<Object,Type> visited) throws Exception {
  // Get the null out of the way
  if (object == null) {
    app.append("null");
    return;
  }
  // If we have no type or the type is Object.class
  // we take the type of the object itself. Normally types
  // come from declaration sites (returns, fields, methods, etc)
  // and contain generic info.
  if (type == null || type == Object.class)
    type = object.getClass();
  // Dispatch to the handler who knows how to handle the given type.
  Handler h = getHandler(type, object.getClass());
  h.encode(app, object, visited);
}

代码示例来源:origin: org.osgi/osgi.enroute.web.simple.provider

void encode(Encoder app, Object object, Type type, Map<Object,Type> visited) throws Exception {
  // Get the null out of the way
  if (object == null) {
    app.append("null");
    return;
  }
  // If we have no type or the type is Object.class
  // we take the type of the object itself. Normally types
  // come from declaration sites (returns, fields, methods, etc)
  // and contain generic info.
  if (type == null || type == Object.class)
    type = object.getClass();
  // Dispatch to the handler who knows how to handle the given type.
  Handler h = getHandler(type, object.getClass());
  h.encode(app, object, visited);
}

代码示例来源:origin: biz.aQute/bndlib

void encode(Encoder app, Object object, Type type, Map<Object,Type> visited) throws Exception {
  // Get the null out of the way
  if (object == null) {
    app.append("null");
    return;
  }
  // If we have no type or the type is Object.class
  // we take the type of the object itself. Normally types
  // come from declaration sites (returns, fields, methods, etc)
  // and contain generic info.
  if (type == null || type == Object.class)
    type = object.getClass();
  // Dispatch to the handler who knows how to handle the given type.
  Handler h = getHandler(type);
  h.encode(app, object, visited);
}

相关文章