public interface CtFieldReference<T> extends CtVariableReference<T>
CtField
.Modifier and Type | Method and Description |
---|---|
CtFieldReference<T> |
clone()
Clone the element which calls this method in a new object.
|
java.lang.reflect.Member |
getActualField()
Gets the runtime member that corresponds to a field reference if any.
|
CtField<T> |
getDeclaration()
Tries to get the declaration of the reference.
|
CtTypeReference<?> |
getDeclaringType()
Gets the type in which the field is declared.
|
CtField<T> |
getFieldDeclaration()
Returns the
CtField that corresponds to the reference
even if its declaring type isn't in the Spoon source path (in this case,
the Spoon elements are built with runtime reflection) |
java.lang.String |
getQualifiedName()
Gets the qualified name of the field.
|
boolean |
isFinal()
Tells if the referenced field is final.
|
boolean |
isStatic()
Tells if the referenced field is static.
|
<C extends CtFieldReference<T>> |
setDeclaringType(CtTypeReference<?> declaringType)
Sets the type in which the field is declared.
|
<C extends CtFieldReference<T>> |
setFinal(boolean b)
Forces a reference to a final element.
|
<C extends CtFieldReference<T>> |
setStatic(boolean b)
Forces a reference to a static element.
|
getModifiers, getType, setType
getSimpleName, setComments, setSimpleName
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, updateAllParentsBelow
getFactory, setFactory
accept
filterChildren, map, map
java.lang.reflect.Member getActualField()
CtField<T> getDeclaration()
CtVariableReference
getDeclaration
in interface CtReference
getDeclaration
in interface CtVariableReference<T>
CtField<T> getFieldDeclaration()
CtField
that corresponds to the reference
even if its declaring type isn't in the Spoon source path (in this case,
the Spoon elements are built with runtime reflection)CtTypeReference<?> getDeclaringType()
java.lang.String getQualifiedName()
boolean isFinal()
boolean isStatic()
<C extends CtFieldReference<T>> C setDeclaringType(CtTypeReference<?> declaringType)
<C extends CtFieldReference<T>> C setFinal(boolean b)
<C extends CtFieldReference<T>> C setStatic(boolean b)
CtFieldReference<T> clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.clone
in interface CtElement
clone
in interface CtReference
clone
in interface CtVariableReference<T>
Copyright © 2007–2021 Inria. All rights reserved.