Package spoon.reflect.declaration
Interface CtAnnotationType<T extends Annotation>
- All Superinterfaces:
Cloneable,CtElement,CtFormalTypeDeclarer,CtModifiable,CtNamedElement,CtQueryable,CtShadowable,CtType<T>,CtTypeInformation,CtTypeMember,CtVisitable,FactoryAccessor,Serializable,SourcePositionHolder
- All Known Implementing Classes:
CtAnnotationTypeImpl
This element defines an annotation type.
-
Field Summary
Fields inherited from interface spoon.reflect.declaration.CtType
INNERTTYPE_SEPARATOR, NAME_UNKNOWN -
Method Summary
Modifier and TypeMethodDescriptionAdds a method to this type.clone()Clone the element which calls this method in a new object.<T extends CtFormalTypeDeclarer>
TsetFormalCtTypeParameters(List<CtTypeParameter> formalTypeParameters) Sets the type parameters of this generic element.setMethods(Set<CtMethod<?>> methods) Sets the methods of this type.setSuperclass(CtTypeReference<?> superClass) Sets the superclass type.setSuperInterfaces(Set<CtTypeReference<?>> interfaces) Sets the super interfaces of this type.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, setComments, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, updateAllParentsBelowMethods inherited from interface spoon.reflect.declaration.CtFormalTypeDeclarer
addFormalCtTypeParameter, addFormalCtTypeParameterAt, getFormalCtTypeParameters, removeFormalCtTypeParameterMethods inherited from interface spoon.reflect.declaration.CtModifiable
addModifier, getExtendedModifiers, getModifiers, getVisibility, hasModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, removeModifier, setExtendedModifiers, setModifiers, setVisibilityMethods inherited from interface spoon.reflect.declaration.CtNamedElement
setSimpleNameMethods inherited from interface spoon.reflect.visitor.chain.CtQueryable
filterChildren, map, mapMethods inherited from interface spoon.reflect.declaration.CtShadowable
isShadow, setShadowMethods inherited from interface spoon.reflect.declaration.CtType
addField, addField, addFieldAtTop, addNestedType, addSuperInterface, addTypeMember, addTypeMemberAt, compileAndReplaceSnippets, copyType, getActualClass, getAllMethods, getField, getFields, getMethod, getMethod, getMethods, getMethodsAnnotatedWith, getMethodsByName, getNestedType, getNestedTypes, getPackage, getReference, getSimpleName, getTypeMembers, getUsedTypes, hasMethod, isTopLevel, removeField, removeMethod, removeNestedType, removeSuperInterface, removeTypeMember, setFields, setNestedTypes, setTypeMembers, toStringWithImportsMethods inherited from interface spoon.reflect.declaration.CtTypeInformation
getAllExecutables, getAllFields, getDeclaredExecutables, getDeclaredField, getDeclaredFields, getDeclaredOrInheritedField, getModifiers, getQualifiedName, getSuperclass, getSuperInterfaces, getTypeErasure, isAnnotationType, isAnonymous, isArray, isClass, isEnum, isGenerics, isInterface, isLocalType, isParameterized, isPrimitive, isSubtypeOfMethods inherited from interface spoon.reflect.declaration.CtTypeMember
getDeclaringType, getTopLevelTypeMethods inherited from interface spoon.reflect.visitor.CtVisitable
acceptMethods inherited from interface spoon.processing.FactoryAccessor
getFactory, setFactory
-
Method Details
-
getAnnotationMethods
Set<CtAnnotationMethod<?>> getAnnotationMethods() -
addMethod
Adds a method to this type.- Specified by:
addMethodin interfaceCtType<T extends Annotation>
-
setMethods
Sets the methods of this type.- Specified by:
setMethodsin interfaceCtType<T extends Annotation>
-
clone
CtAnnotationType<T> 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 interfaceCtNamedElement- Specified by:
clonein interfaceCtType<T extends Annotation>- Returns:
- a clone of this element. All children are cloned, but the parent of the returned clone is set to null.
-
setFormalCtTypeParameters
<T extends CtFormalTypeDeclarer> T setFormalCtTypeParameters(List<CtTypeParameter> formalTypeParameters) Description copied from interface:CtFormalTypeDeclarerSets the type parameters of this generic element.- Specified by:
setFormalCtTypeParametersin interfaceCtFormalTypeDeclarer
-
setSuperInterfaces
Description copied from interface:CtTypeSets the super interfaces of this type.- Specified by:
setSuperInterfacesin interfaceCtType<T extends Annotation>
-
setSuperclass
Description copied from interface:CtTypeSets the superclass type.- Specified by:
setSuperclassin interfaceCtType<T extends Annotation>
-