@Override
  public String getName() {
    // TODO not clear why is it null
    if (reverseMappingClasses == null) {
      reverseMappingClasses = new TreeMap<>();
    }

    if (reverseMappingClasses.containsKey(metaObject.getName())) {
      return reverseMappingClasses.get(metaObject.getName());
    }

    return metaObject.getName();
  }
Esempio n. 2
0
  @SuppressWarnings("unchecked")
  static List<Object> cloneList(List<?> list) {

    List<Object> objects = new ArrayList<Object>(list.size());

    for (Object obj : list) {
      if (obj instanceof Map) {
        objects.add(MetaObject.cloneMap((Map<String, Object>) obj));
      } else if (obj instanceof MetaObject) {
        objects.add(((MetaObject) obj).toMap());
      } else if (obj instanceof List) {
        objects.add(cloneList((List<?>) obj));
      } else {
        objects.add(obj);
      }
    }

    return objects;
  }
 @Override
 public MethodInfo[] getDeclaredMethods() {
   return metaObject.getDeclaredMethods();
 }
 @Override
 public ConstructorInfo[] getDeclaredConstructors() {
   return metaObject.getDeclaredConstructors();
 }
 @Override
 public FieldInfo[] getDeclaredFields() {
   return metaObject.getDeclaredFields();
 }
 @Override
 public InterfaceInfo[] getInterfaces() {
   return metaObject.getInterfaces();
 }
 @Override
 public String getSuperclassGenerics() {
   return metaObject.getSuperclassGenerics();
 }
 @Override
 public int getModifiers() {
   return metaObject.getModifiers();
 }
 @Override
 public AnnotationInfo[] getAnnotations() {
   return metaObject.getAnnotations();
 }
 @Override
 public String getClassGenerics(String name) {
   return metaObject.getClassGenerics(name);
 }
Esempio n. 11
0
 private JsonObject toJsonObject(MetaObject value) {
   return new JsonObject(value.toMap());
 }