public interface CtReference extends CtElement
java.lang.reflect
) to access the program information, as long as
available in the classpath.CtElement
Modifier and Type | Method and Description |
---|---|
CtReference |
clone()
Clone the element which calls this method in a new object.
|
CtElement |
getDeclaration()
Returns the declaration that corresponds to the referenced element only
if the declaration is in the analyzed source files.
|
String |
getSimpleName()
Gets the simple name of referenced element.
|
<E extends CtElement> |
setComments(List<CtComment> comments)
comments are not possible for references
|
<T extends CtReference> |
setSimpleName(String simpleName)
Sets the name of referenced element.
|
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, updateAllParentsBelow
getFactory, setFactory
accept
filterChildren, map, map
getOriginalSourceFragment
String getSimpleName()
<T extends CtReference> T setSimpleName(String simpleName)
CtElement getDeclaration()
CtTypeReference.getTypeDeclaration()
and CtExecutableReference.getExecutableDeclaration()
that never return null.CtReference clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.<E extends CtElement> E setComments(List<CtComment> comments)
setComments
in interface CtElement
Copyright © 2007–2019 Inria. All rights reserved.