Package com.thoughtworks.qdox.model
Interface JavaField
-
- All Superinterfaces:
JavaAnnotatedElement
,JavaMember
,JavaModel
,java.io.Serializable
- All Known Implementing Classes:
DefaultJavaField
public interface JavaField extends JavaAnnotatedElement, JavaMember, JavaModel
Modeled equivalent ofField
, providing the most important methods. Where the original Field is using an Array, this model is using aList
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getCodeBlock()
The in-code representation of this field.java.util.List<Expression>
getEnumConstantArguments()
JavaClass
getEnumConstantClass()
java.lang.String
getInitializationExpression()
Get the original expression used to initialize the field.JavaClass
getType()
Equivalent ofField.getType()
boolean
isEnumConstant()
Equivalent ofField.isEnumConstant()
-
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
-
-
-
-
Method Detail
-
getType
JavaClass getType()
Equivalent ofField.getType()
- Returns:
- the type of this field, should never be
null
.
-
getCodeBlock
java.lang.String getCodeBlock()
The in-code representation of this field.- Specified by:
getCodeBlock
in interfaceJavaModel
- Returns:
- the complete representation of this field
-
getInitializationExpression
java.lang.String getInitializationExpression()
Get the original expression used to initialize the field.- Returns:
- initialization as string.
-
isEnumConstant
boolean isEnumConstant()
Equivalent ofField.isEnumConstant()
- Returns:
true
if this field is an enum constant, otherwisefalse
- Since:
- 2.0
-
getEnumConstantClass
JavaClass getEnumConstantClass()
- Returns:
- the classBody of the enum constant
- Since:
- 2.0
-
getEnumConstantArguments
java.util.List<Expression> getEnumConstantArguments()
- Returns:
- the arguments of the enum constant
- Since:
- 2.0
-
-