Class JConstant

  • All Implemented Interfaces:
    JAnnotatedElement, JMember

    public final class JConstant
    extends AbstractJField
    A class which holds information about a constant. Modeled closely after the Java Reflection API. This class is part of package which is used to create source code in memory.
    Since:
    1.3
    Author:
    Werner Guttmann
    • Constructor Detail

      • JConstant

        public JConstant​(JType type,
                         java.lang.String name)
        Creates a new JConstant.
        Parameters:
        type - JType of this new constant.
        name - Name of this new constant.
      • JConstant

        public JConstant​(JType type,
                         java.lang.String name,
                         boolean makePrivate)
        Creates a new JConstant.
        Parameters:
        type - JType of this new constant.
        name - Name of this new constant.
        makePrivate - True if constant definition should have private visibility.