Examples of JEnumConstant


Examples of com.sun.codemodel.internal.JEnumConstant

                getErrorReceiver().error( e.getLocator(), Messages.ERR_NAME_COLLISION.format(constName));

            // [RESULT]
            // <Const>(...)
            // ASSUMPTION: datatype is outline-independent
            JEnumConstant constRef = type.enumConstant(constName);
            if(needsValue)
                constRef.arg(e.base.createConstant(this, new XmlString(mem.getLexicalValue())));

            if(!mem.getLexicalValue().equals(constName))
                constRef.annotate2(XmlEnumValueWriter.class).value(mem.getLexicalValue());

            // set javadoc
            if( mem.javadoc!=null )
                constRef.javadoc().append(mem.javadoc);

            eo.constants.add(new EnumConstantOutline(mem,constRef){});
        }

View Full Code Here

Examples of com.sun.codemodel.internal.JEnumConstant

            }

            // [RESULT]
            // <Const>(...)
            // ASSUMPTION: datatype is outline-independent
            JEnumConstant constRef = type.enumConstant(constName);
            if (needsValue) {
                constRef.arg(e.base.createConstant(this, new XmlString(mem.getLexicalValue())));
            }

            if (!mem.getLexicalValue().equals(constName)) {
                constRef.annotate2(XmlEnumValueWriter.class).value(mem.getLexicalValue());
            }

            // set javadoc
            if (mem.javadoc != null) {
                constRef.javadoc().append(mem.javadoc);
            }

            eo.constants.add(new EnumConstantOutline(mem, constRef) {
            });
        }
View Full Code Here

Examples of org.exolab.javasource.JEnumConstant

        jEnum.addConstructor(constructor);

        int enumCount = 0;
        while (enumeration.hasMoreElements()) {
            Facet facet = (Facet) enumeration.nextElement();
            JEnumConstant enumConstant;
            if (useValuesAsName) {
                enumConstant = new JEnumConstant(
                        translateEnumValueToIdentifier(component.getEnumBinding(), facet),
                        new String[]{"\"" + facet.getValue() "\""});
            } else {
                enumConstant = new JEnumConstant(
                        "VALUE_" + enumCount, new String[]{"\""
                                + facet.getValue() + "\""});
            }
           
            // custom annotations
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.