Package spoon.reflect.reference
Interface CtWildcardReference
- All Superinterfaces:
Cloneable,CtActualTypeContainer,CtElement,CtQueryable,CtReference,CtShadowable,CtTypeInformation,CtTypeParameterReference,CtTypeReference<Object>,CtVisitable,FactoryAccessor,Serializable,SourcePositionHolder
- All Known Implementing Classes:
CtWildcardReferenceImpl
Represents a wildcard in generic type annotations, i.e. the "?" (e.g. the "?" in Collection<?> or Collection<? extends List>).
-
Field Summary
Fields inherited from interface spoon.reflect.reference.CtTypeReference
NULL_TYPE_NAME, OMITTED_TYPE_ARG_NAME -
Method Summary
Modifier and TypeMethodDescriptionclone()Clone the element which calls this method in a new object.A type parameter can have anextendsclause which declare one (CtTypeReferenceor more (CtIntersectionTypeReferencereferences.booleanisUpper()Returnstrueif the bounds are inextendsclause.<T extends CtWildcardReference>
TsetBoundingType(CtTypeReference<?> superType)Sets theextendsclause of the type parameter.<C extends CtReference>
CsetSimpleName(String simpleName)Sets the name of referenced element.<T extends CtWildcardReference>
TsetUpper(boolean upper)Set totrueto writeextendsclause for bounds types.Methods inherited from interface spoon.reflect.reference.CtActualTypeContainer
addActualTypeArgument, getActualTypeArguments, removeActualTypeArgumentMethods inherited from interface spoon.reflect.declaration.CtElement
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, updateAllParentsBelowMethods inherited from interface spoon.reflect.visitor.chain.CtQueryable
filterChildren, map, mapMethods inherited from interface spoon.reflect.reference.CtReference
setCommentsMethods inherited from interface spoon.reflect.declaration.CtShadowable
isShadow, setShadowMethods inherited from interface spoon.reflect.declaration.CtTypeInformation
getAllExecutables, getAllFields, getDeclaredExecutables, getDeclaredField, getDeclaredFields, getDeclaredOrInheritedField, getQualifiedName, getTypeErasure, isAnnotationType, isAnonymous, isArray, isClass, isEnum, isGenerics, isInterface, isLocalType, isParameterized, isPrimitive, isSubtypeOfMethods inherited from interface spoon.reflect.reference.CtTypeParameterReference
getDeclaration, isDefaultBoundingType, setActualTypeArgumentsMethods inherited from interface spoon.reflect.reference.CtTypeReference
asCtIntersectionTypeReference, box, canAccess, canAccess, getAccessType, getActualClass, getDeclaringType, getModifiers, getPackage, getSimpleName, getSuperclass, getSuperInterfaces, getTopLevelType, getTypeDeclaration, getTypeParameterDeclaration, isSimplyQualified, setDeclaringType, setPackage, setSimplyQualified, unboxMethods inherited from interface spoon.reflect.visitor.CtVisitable
acceptMethods inherited from interface spoon.processing.FactoryAccessor
getFactory, setFactory
-
Method Details
-
clone
CtWildcardReference clone()Description copied from interface:CtElementClone the element which calls this method in a new object. Note that that references are kept as is, and thus, so if you clone whole classes or methods, some parts of the cloned element (eg executable references) may still point to the initial element. In this case, consider using methodsRefactoring.copyType(CtType)andRefactoring.copyMethod(CtMethod)instead which does additional work beyond cloning.- Specified by:
clonein interfaceCtElement- Specified by:
clonein interfaceCtReference- Specified by:
clonein interfaceCtTypeParameterReference- Specified by:
clonein interfaceCtTypeReference<Object>
-
setSimpleName
Description copied from interface:CtReferenceSets the name of referenced element.- Specified by:
setSimpleNamein interfaceCtReference
-
isUpper
boolean isUpper()Returnstrueif the bounds are inextendsclause.falsemeans asuperclause. -
setUpper
Set totrueto writeextendsclause for bounds types. -
getBoundingType
CtTypeReference<?> getBoundingType()A type parameter can have anextendsclause which declare one (CtTypeReferenceor more (CtIntersectionTypeReferencereferences.// Extends with generics. T extends Interface1 // Intersection type with generics. T extends Interface1 & Interface2- Specified by:
getBoundingTypein interfaceCtTypeParameterReference
-
setBoundingType
Sets theextendsclause of the type parameter.
-