Package org.nutz.json

Examples of org.nutz.json.JsonField.ignore()


  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());
View Full Code Here


      //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());
View Full Code Here

            fieldMap.put(ef.getName(), ef);
        }
        for (Method m : mirror.getMethods()) {
            final JsonField jf = m.getAnnotation(JsonField.class);
            // 忽略方法
            if (null == jf || jf.ignore())
                continue;

            // 如果有,尝试作新的 Entity
            final Method method = m;
            Callback<Method> whenError = new Callback<Method>() {
View Full Code Here

        jef.ejecting = mirror.getEjecting(fld.getName());
        jef.injecting = mirror.getInjecting(fld.getName());

        // 瞬时变量和明确声明忽略的,变 ignore
        if (Modifier.isTransient(fld.getModifiers())
            || (null != jf && jf.ignore())) {
            jef.setIgnore(true);
        }


        // 判断字段是否被强制输出为字符串
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.