Package com.totsp.gwittir.serial.json.client

Examples of com.totsp.gwittir.serial.json.client.JSONField


    public void writeReader(SourceWriter writer, RProperty prop) {
        if(prop.getWriteMethod() == null ){
            return;
        }

        JSONField field = prop.getReadMethod() == null ? null : prop.getReadMethod().getBaseMethod()
                              .getAnnotation(JSONField.class);
        JSONOmit omit = prop.getReadMethod() == null ? null : prop.getReadMethod().getBaseMethod()
                            .getAnnotation(JSONOmit.class);
        System.out.println( prop.getName() + " omit "+omit + " field "+field );
        if (omit != null) {
            return;
        }

        String fieldName = (field == null) ? prop.getName() : field.value();

        try {
            writer.println("if(root.containsKey(\"" + fieldName + "\")){");

            if (prop.getType().isPrimitive() == null) {
View Full Code Here


        for (RProperty prop : r.getProperties().values()) {
            if (prop.getName().equals("class") || prop.getReadMethod() == null) {
                continue;
            }

            JSONField field = prop.getReadMethod().getBaseMethod()
                                  .getAnnotation(JSONField.class);
            JSONOmit omit = prop.getReadMethod().getBaseMethod()
                                .getAnnotation(JSONOmit.class);
            System.out.println(" ws \t "+prop.getName() +" "+ prop.getReadMethod().getBaseMethod().getEnclosingType()+ prop.getReadMethod().getBaseMethod().getReadableDeclaration()  + " "+ omit +" "+field );
            if (omit != null) {
                continue;
            }

            String fieldName = (field == null) ? prop.getName() : field.value();

            if (prop.getReadMethod() != null) {
                JClassType classType = prop.getType().isClassOrInterface();
                JArrayType arrayType = prop.getType().isArray();
                System.out.println(prop.getName()+ "  ArrayType "+arrayType +" :: "+((arrayType == null ? "" : ""+arrayType.getComponentType())));
View Full Code Here

TOP

Related Classes of com.totsp.gwittir.serial.json.client.JSONField

Copyright © 2018 www.massapicom. 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.