Examples of JSONField


Examples of org.nutz.json.JsonField

  private Injecting injecting;

  private Ejecting ejecting;

  public static JsonEntityField eval(Mirror<?> mirror, Field fld) {
    JsonField jf = fld.getAnnotation(JsonField.class);
    if (null != jf && jf.ignore())
      return null;

    JsonEntityField jef = new JsonEntityField();
    jef.injecting = mirror.getInjecting(fld.getName());
    jef.ejecting = mirror.getEjecting(fld.getName());
    jef.genericType = fld.getGenericType();

    if (null != jf && !Strings.isBlank(jf.value()))
      jef.name = jf.value();
    else
      jef.name = fld.getName();

    return jef;
  }
View Full Code Here

Examples of org.nutz.json.JsonField

        // XXX 有用户就是_开头的字段也要啊! by wendal
      //if (fld.getName().startsWith("_") || fld.getName().startsWith("$"))
      if (fld.getName().startsWith("$") && fld.getAnnotation(JsonField.class) == null)
        return null;
     
        JsonField jf = fld.getAnnotation(JsonField.class);
        if (null != jf && jf.ignore())
            return null;

        JsonEntityField jef = new JsonEntityField();
        jef.genericType = Lang.getFieldType(mirror, fld);
        jef.name = Strings.sBlank(null == jf ? null : jf.value(), fld.getName());
        jef.ejecting = mirror.getEjecting(fld.getName());
        jef.injecting = mirror.getInjecting(fld.getName());

        return jef;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.