Class JConstant
java.lang.Object
org.exolab.javasource.JAnnotatedElementHelper
org.exolab.javasource.AbstractJField
org.exolab.javasource.JConstant
- All Implemented Interfaces:
JAnnotatedElement, JMember
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 Summary
Constructors -
Method Summary
Methods inherited from class AbstractJField
getComment, getDeclaringClass, getInitString, getModifiers, getName, getType, isDateTime, setComment, setComment, setDateTime, setDeclaringClass, setInitString, setModifiers, setName, toStringModifier and TypeMethodDescriptionReturns the JavaDoc comment describing this member.Returns the class in which this JField has been declared.Returns the initialization String for this JField.Returns the modifiers for this JField.getName()Returns the name of this JField.getType()Returns the JType representing the type of this JField.booleanIndicates whether this JField instance represents a field of type date/time.voidsetComment(String comment) Sets the JavaDoc comment describing this JField.voidsetComment(JDocComment comment) Sets the JavaDoc comment describing this JField.voidsetDateTime(boolean isDateTime) To indicate whether this JField instance represents a field of type date/time.protected voidsetDeclaringClass(JClass declaringClass) Sets the class that declares this JField.voidsetInitString(String init) Sets the initialization string for this JField.voidsetModifiers(JModifiers modifiers) Sets the access modifiers on this JField.voidSets the name of this JField.toString()Methods inherited from class JAnnotatedElementHelper
addAnnotation, getAnnotation, getAnnotations, hasAnnotations, isAnnotationPresent, printAnnotations, removeAnnotationModifier and TypeMethodDescriptionfinal voidaddAnnotation(JAnnotation annotation) Adds a JAnnotation to this source element.final JAnnotationgetAnnotation(JAnnotationType annotationType) Retrieves a JAnnotation for the given JAnnotationType, returns null if no annotation has been set.final JAnnotation[]Returns a list of JAnnotation's already set on this source element.final booleanReturns true if this source element has any annotations.final booleanisAnnotationPresent(JAnnotationType annotationType) Returns true if a JAnnotation exists for the given JAnnotationType.final booleanOutputs the list of annotations maintained by this object.final JAnnotationremoveAnnotation(JAnnotationType annotationType) Removes the JAnnotation from this source element for the given JAnnotationType.
-
Constructor Details
-
JConstant
-
JConstant
-