Package org.exolab.javasource

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


        JField jField = new JField(new JClass("java.lang.String"), "value");
        JModifiers modifiers = new JModifiers();
        modifiers.setFinal(true);
        modifiers.makePrivate();
        jField.setModifiers(modifiers);
        jEnum.addField(jField);

        JMethod valueMethod = new JMethod("value", new JClass("java.lang.String"),
                "the value of this constant");
        valueMethod.setSourceCode("return this.value;");
        jEnum.addMethod(valueMethod, false);
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.