Package spoon.reflect.reference
Interface CtIntersectionTypeReference<T>
- All Superinterfaces:
Cloneable
,CtActualTypeContainer
,CtElement
,CtQueryable
,CtReference
,CtShadowable
,CtTypeInformation
,CtTypeReference<T>
,CtVisitable
,FactoryAccessor
,Serializable
,SourcePositionHolder
- All Known Implementing Classes:
CtIntersectionTypeReferenceImpl
This interface defines a reference to an intersection type in generics or in casts.
-
Field Summary
Fields inherited from interface spoon.reflect.reference.CtTypeReference
NULL_TYPE_NAME, OMITTED_TYPE_ARG_NAME
-
Method Summary
Modifier and TypeMethodDescription<C extends CtIntersectionTypeReference>
CaddBound(CtTypeReference<?> bound)
Adds a bound.clone()
Clone the element which calls this method in a new object.List<CtTypeReference<?>>
Gets the bounds of the intersection type.boolean
removeBound(CtTypeReference<?> bound)
Removes a bound.<C extends CtIntersectionTypeReference>
CsetBounds(List<CtTypeReference<?>> bounds)
Sets the bounds of the intersection type.Methods inherited from interface spoon.reflect.reference.CtActualTypeContainer
addActualTypeArgument, getActualTypeArguments, removeActualTypeArgument, setActualTypeArguments
Methods 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, updateAllParentsBelow
Methods inherited from interface spoon.reflect.visitor.chain.CtQueryable
filterChildren, map, map
Methods inherited from interface spoon.reflect.reference.CtReference
setComments, setSimpleName
Methods inherited from interface spoon.reflect.declaration.CtShadowable
isShadow, setShadow
Methods 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, isSubtypeOf
Methods inherited from interface spoon.reflect.reference.CtTypeReference
asCtIntersectionTypeReference, box, canAccess, canAccess, getAccessType, getActualClass, getDeclaration, getDeclaringType, getModifiers, getPackage, getSimpleName, getSuperclass, getSuperInterfaces, getTopLevelType, getTypeDeclaration, getTypeParameterDeclaration, isSimplyQualified, setDeclaringType, setPackage, setSimplyQualified, unbox
Methods inherited from interface spoon.reflect.visitor.CtVisitable
accept
Methods inherited from interface spoon.processing.FactoryAccessor
getFactory, setFactory
-
Method Details
-
getBounds
List<CtTypeReference<?>> getBounds()Gets the bounds of the intersection type. Note that the first bound correspond to the current intersection type.T extends Interface1 & Interface2 // CtTypeParameterReference#getBoundingType == Interface1 and getBounds().get(0) == Interface1
-
setBounds
Sets the bounds of the intersection type. -
addBound
Adds a bound. -
removeBound
Removes a bound. -
clone
CtIntersectionTypeReference<T> clone()Description copied from interface:CtElement
Clone 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:
clone
in interfaceCtElement
- Specified by:
clone
in interfaceCtReference
- Specified by:
clone
in interfaceCtTypeReference<T>
-