Package com.thoughtworks.qdox.model.impl
Class DefaultJavaField
java.lang.Object
com.thoughtworks.qdox.model.impl.AbstractJavaModel
com.thoughtworks.qdox.model.impl.AbstractBaseJavaEntity
com.thoughtworks.qdox.model.impl.AbstractJavaEntity
com.thoughtworks.qdox.model.impl.DefaultJavaField
- All Implemented Interfaces:
JavaAnnotatedElement
,JavaField
,JavaMember
,JavaModel
,Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private List<Expression>
private JavaClass
private String
private JavaClass
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this Field against the specified object.The in-code representation of this field.Get the original expression used to initialize the field.getType()
Equivalent ofField.getType()
int
hashCode()
boolean
Equivalent ofField.isEnumConstant()
void
setEnumConstant
(boolean enumConstant) void
setEnumConstantArguments
(List<Expression> enumConstantArguments) void
setEnumConstantClass
(JavaClass enumConstantClass) void
setInitializationExpression
(String initializationExpression) void
toString()
Methods inherited from class com.thoughtworks.qdox.model.impl.AbstractJavaEntity
getDeclaringClass, getModifiers, getName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setDeclaringClass, setModifiers, setName
Methods inherited from class com.thoughtworks.qdox.model.impl.AbstractBaseJavaEntity
getAnnotations, getComment, getNamedParameter, getSource, getTagByName, getTags, getTagsByName, setAnnotations, setComment, setSource, setTags
Methods inherited from class com.thoughtworks.qdox.model.impl.AbstractJavaModel
getLineNumber, getModelWriter, setLineNumber, setModelWriterFactory
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.thoughtworks.qdox.model.JavaAnnotatedElement
getAnnotations, getComment, getNamedParameter, getTagByName, getTags, getTagsByName
Methods inherited from interface com.thoughtworks.qdox.model.JavaMember
getDeclaringClass, getModifiers, getName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile
Methods inherited from interface com.thoughtworks.qdox.model.JavaModel
getLineNumber
-
Field Details
-
type
-
initializationExpression
-
enumConstant
private boolean enumConstant -
enumConstantClass
-
enumConstantArguments
-
-
Constructor Details
-
DefaultJavaField
-
DefaultJavaField
-
-
Method Details
-
getType
Equivalent ofField.getType()
-
getCodeBlock
The in-code representation of this field.- Specified by:
getCodeBlock
in interfaceJavaField
- Specified by:
getCodeBlock
in interfaceJavaModel
- Returns:
- the complete representation of this field
-
setType
-
getInitializationExpression
Get the original expression used to initialize the field.- Specified by:
getInitializationExpression
in interfaceJavaField
- Returns:
- initialization as string.
-
setInitializationExpression
-
isEnumConstant
public boolean isEnumConstant()Equivalent ofField.isEnumConstant()
- Specified by:
isEnumConstant
in interfaceJavaField
- Returns:
true
if this field is an enum constant, otherwisefalse
-
setEnumConstant
public void setEnumConstant(boolean enumConstant) -
getEnumConstantArguments
- Specified by:
getEnumConstantArguments
in interfaceJavaField
- Returns:
- the arguments of the enum constant
-
setEnumConstantArguments
-
getEnumConstantClass
- Specified by:
getEnumConstantClass
in interfaceJavaField
- Returns:
- the classBody of the enum constant
-
setEnumConstantClass
-
toString
-
equals
Compares this Field against the specified object. Returnstrue
if the objects are the same. Two Field objects are the same if they were declared by the same class and have the same name and type. -
hashCode
public int hashCode()
-