public class GroovyFieldElement extends AbstractGroovyElement implements FieldElement
Variable
. The
variable could be a field or property node.compilationUnit, sourceUnit, visitorContext
EMPTY_ELEMENT_ARRAY
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Modifier and Type | Method and Description |
---|---|
int |
getArrayDimensions()
If the type is an array, the number of dimensions.
|
ClassElement |
getDeclaringType() |
ClassElement |
getGenericField()
Obtain the generic type with the associated annotation metadata for the field.
|
Set<ElementModifier> |
getModifiers() |
String |
getName() |
Object |
getNativeType()
Returns the native underlying type.
|
ClassElement |
getType() |
boolean |
isAbstract() |
boolean |
isArray()
Is the type an array.
|
boolean |
isFinal() |
boolean |
isPrimitive()
Whether the type is primitive.
|
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isPublic() |
boolean |
isStatic() |
String |
toString() |
alignNewGenericsInfo, annotate, annotate, equals, getAnnotationMetadata, getGenericElement, hashCode, isPackagePrivate, removeAnnotation, removeAnnotationIf, removeStereotype, resolveAnnotationMetadata, resolveModifiers, resolveModifiers, resolveModifiers
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDescription
getGenericType
getOwningType, isReflectionRequired, isReflectionRequired
annotate, annotate, annotate, annotate, annotate, getDescription, getDocumentation, getSimpleName, isPackagePrivate, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
getAnnotationValuesByName, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
getAnnotationMetadata
public Set<ElementModifier> getModifiers()
getModifiers
in interface Element
getModifiers
in interface MemberElement
ElementModifier
types for this class elementpublic ClassElement getGenericField()
FieldElement
getGenericField
in interface FieldElement
public boolean isPrimitive()
TypedElement
isPrimitive
in interface TypedElement
public boolean isArray()
TypedElement
isArray
in interface TypedElement
public int getArrayDimensions()
TypedElement
getArrayDimensions
in interface TypedElement
public String getName()
public boolean isAbstract()
isAbstract
in interface Element
public boolean isStatic()
public boolean isPublic()
public boolean isPrivate()
public boolean isFinal()
public boolean isProtected()
isProtected
in interface Element
public Object getNativeType()
Element
getNativeType
in interface Element
@NonNull public ClassElement getType()
getType
in interface TypedElement
public ClassElement getDeclaringType()
getDeclaringType
in interface MemberElement