public class CtArrayTypeReferenceImpl<T> extends CtTypeReferenceImpl<T> implements CtArrayTypeReference<T>
simplename
ERROR_MESSAGE_TO_STRING, factory, LOGGER, parent
NULL_TYPE_NAME, OMITTED_TYPE_ARG_NAME
Constructor and Description |
---|
CtArrayTypeReferenceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
accept(CtVisitor visitor)
Accepts a visitor
|
CtArrayTypeReference<T> |
clone()
Clone the element which calls this method in a new object.
|
java.lang.Class<T> |
getActualClass()
Gets the Java runtime class of the referenced type.
|
CtTypeReference<?> |
getArrayType()
Gets the type of the array elements at the finest grain.
|
CtTypeReference<?> |
getComponentType()
Gets the type of the elements contained in this array.
|
int |
getDimensionCount()
Returns the number of dimensions of this array type.
|
java.lang.String |
getQualifiedName()
Returns the fully qualified name of this type declaration.
|
java.lang.String |
getSimpleName()
Gets the simple name of referenced element.
|
CtTypeReference<?> |
getTypeErasure() |
boolean |
isSimplyQualified() |
<C extends CtArrayTypeReference<T>> |
setComponentType(CtTypeReference<?> componentType)
Sets the type of the elements contained in this array.
|
<T extends CtReference> |
setSimpleName(java.lang.String simplename)
Sets the name of referenced element.
|
CtArrayTypeReferenceImpl<T> |
setSimplyQualified(boolean isSimplyQualified) |
addActualTypeArgument, asCtIntersectionTypeReference, box, canAccess, canAccess, findClass, getAccessType, getActualAnnotatedElement, getActualTypeArguments, getAllExecutables, getAllFields, getDeclaration, getDeclaredExecutables, getDeclaredField, getDeclaredFields, getDeclaredOrInheritedField, getDeclaringType, getModifiers, getPackage, getSuperclass, getSuperInterfaces, getTopLevelType, getTypeDeclaration, getTypeParameterDeclaration, isAnnotationType, isAnonymous, isArray, isClass, isEnum, isGenerics, isInterface, isLocalType, isParameterized, isPrimitive, isShadow, isSubtypeOf, removeActualTypeArgument, setActualTypeArguments, setDeclaringType, setPackage, setShadow, unbox
equals, setComments
addAnnotation, addComment, asIterable, comment, delete, descendantIterator, emptyList, emptySet, filterChildren, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getFactory, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hashCode, hasParent, isImplicit, isParentInitialized, map, map, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setDocComment, setFactory, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, unmodifiableList, updateAllParentsBelow
finalize, getClass, notify, notifyAll, wait, wait, wait
asCtIntersectionTypeReference, box, canAccess, canAccess, getAccessType, getDeclaration, getDeclaringType, getModifiers, getPackage, getSuperclass, getSuperInterfaces, getTopLevelType, getTypeDeclaration, getTypeParameterDeclaration, setDeclaringType, setPackage, unbox
setComments
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
filterChildren, map, map
addActualTypeArgument, getActualTypeArguments, removeActualTypeArgument, setActualTypeArguments
getAllExecutables, getAllFields, getDeclaredExecutables, getDeclaredField, getDeclaredFields, getDeclaredOrInheritedField, isAnnotationType, isAnonymous, isArray, isClass, isEnum, isGenerics, isInterface, isLocalType, isParameterized, isPrimitive, isSubtypeOf
isShadow, setShadow
public void accept(CtVisitor visitor)
CtVisitable
accept
in interface CtVisitable
accept
in class CtTypeReferenceImpl<T>
public CtTypeReference<?> getComponentType()
CtArrayTypeReference
int[][][]
,
this method returns a type reference for int[][]
.getComponentType
in interface CtArrayTypeReference<T>
public CtTypeReference<?> getArrayType()
CtArrayTypeReference
int[][][]
,
this method returns a type reference to "int".getArrayType
in interface CtArrayTypeReference<T>
public <C extends CtArrayTypeReference<T>> C setComponentType(CtTypeReference<?> componentType)
CtArrayTypeReference
setComponentType
in interface CtArrayTypeReference<T>
public java.lang.String getSimpleName()
CtReference
getSimpleName
in interface CtArrayTypeReference<T>
getSimpleName
in interface CtReference
getSimpleName
in interface CtTypeReference<T>
getSimpleName
in class CtReferenceImpl
public <T extends CtReference> T setSimpleName(java.lang.String simplename)
CtReference
setSimpleName
in interface CtArrayTypeReference<T>
setSimpleName
in interface CtReference
setSimpleName
in class CtReferenceImpl
public java.lang.String getQualifiedName()
CtTypeInformation
getQualifiedName
in interface CtTypeInformation
getQualifiedName
in class CtTypeReferenceImpl<T>
public java.lang.Class<T> getActualClass()
CtTypeReference
CtTypeReference.getTypeDeclaration()
instead,
in order to only stay in the Spoon world and manipulate CtType instead of java.lang.Class.getActualClass
in interface CtTypeReference<T>
getActualClass
in class CtTypeReferenceImpl<T>
SpoonClassNotFoundException
if the class is not found.public int getDimensionCount()
CtArrayTypeReference
CtArrayTypeReference.getComponentType()
).getDimensionCount
in interface CtArrayTypeReference<T>
public CtTypeReference<?> getTypeErasure()
getTypeErasure
in interface CtTypeInformation
getTypeErasure
in class CtTypeReferenceImpl<T>
public CtArrayTypeReference<T> clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.clone
in interface CtElement
clone
in interface CtArrayTypeReference<T>
clone
in interface CtReference
clone
in interface CtTypeReference<T>
clone
in class CtTypeReferenceImpl<T>
public boolean isSimplyQualified()
isSimplyQualified
in interface CtTypeReference<T>
isSimplyQualified
in class CtTypeReferenceImpl<T>
public CtArrayTypeReferenceImpl<T> setSimplyQualified(boolean isSimplyQualified)
setSimplyQualified
in interface CtTypeReference<T>
setSimplyQualified
in class CtTypeReferenceImpl<T>
isSimplyQualified
- false then the reference is printed fully qualified name.
true then only the type name is printed.Copyright © 2007–2021 Inria. All rights reserved.