Package org.exolab.javasource

Examples of org.exolab.javasource.JClass.addField()


                JModifiers modifiers = field.getModifiers();
                modifiers.setFinal(true);
                modifiers.setStatic(true);
                modifiers.makePublic();
                field.setInitString(Integer.toString(count));
                jClass.addField(field);

                //-- handle Class type
                field = new JField(jClass, objName);
                field.setComment("The instance of the " + value + " type");
View Full Code Here


                init.append(", \"");
                init.append(escapeValue(value));
                init.append("\")");

                field.setInitString(init.toString());
                jClass.addField(field);

            }
            //-- initializer method

            if (addInitializerCode) {
View Full Code Here

        method.getSourceCode().add("return members;");

        //-- add memberTable to the class, we can only add this after all the types,
        //-- or we'll create source code that will generate null pointer exceptions,
        //-- because calling init() will try to add null values to the hashtable.
        jClass.addField(fHash);

        //-- add internal type
        field = new JField(JType.INT, "type");
        field.getModifiers().setFinal(true);
        jClass.addField(field);
View Full Code Here

        jClass.addField(fHash);

        //-- add internal type
        field = new JField(JType.INT, "type");
        field.getModifiers().setFinal(true);
        jClass.addField(field);

        //-- add internal stringValue
        field = new JField(SGTypes.STRING, "stringValue");
        field.setInitString("null");
        jClass.addField(field);
View Full Code Here

        jClass.addField(field);

        //-- add internal stringValue
        field = new JField(SGTypes.STRING, "stringValue");
        field.setInitString("null");
        jClass.addField(field);

        createGetTypeMethod(jClass, className);
    } //-- processEnumerationAsNewObject
   
    private void createJava5Enum(final SimpleType simpleType,
View Full Code Here

        }

        values.append("\n}");

        fValues.setInitString(values.toString());
        jClass.addField(fValues);

        //-- #valueOf method
        JMethod method = new JMethod("valueOf", jClass,
                                     "the String value of the provided " + baseType.getJType());
        method.addParameter(new JParameter(SGTypes.STRING, "string"));
View Full Code Here

            JModifiers modifiers = field.getModifiers();
            modifiers.setFinal(true);
            modifiers.setStatic(true);
            modifiers.makePublic();
            field.setInitString(Integer.toString(count));
            jClass.addField(field);

            //-- handle Class type
            field = new JField(jClass, objName);
            field.setComment("The instance of the " + value + " type");
View Full Code Here

            init.append(", \"");
            init.append(escapeValue(value));
            init.append("\")");

            field.setInitString(init.toString());
            jClass.addField(field);


            //-- initializer method

            if (addInitializerCode) {
View Full Code Here

        //-- add this after all the types, or we'll
        //-- create source code that will generate
        //-- null pointer exceptions, because calling
        //-- init() will try to add null values to
        //-- the hashtable.
        jClass.addField(fHash);

        //-- add internal type
        field = new JField(JType.Int, "type");
        field.setInitString("-1");
        jClass.addField(field);
View Full Code Here

        jClass.addField(fHash);

        //-- add internal type
        field = new JField(JType.Int, "type");
        field.setInitString("-1");
        jClass.addField(field);

        //-- add internal stringValue
        field = new JField(SGTypes.String, "stringValue");
        field.setInitString("null");
        jClass.addField(field);
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.