Package spoon.reflect.declaration
Interface CtAnnotationMethod<T>
- All Superinterfaces:
Cloneable,CtBodyHolder,CtElement,CtExecutable<T>,CtFormalTypeDeclarer,CtMethod<T>,CtModifiable,CtNamedElement,CtQueryable,CtShadowable,CtTypedElement<T>,CtTypeMember,CtVisitable,FactoryAccessor,Serializable,SourcePositionHolder
- All Known Implementing Classes:
CtAnnotationMethodImpl
This element defines an annotation method declared in an annotation type.
-
Field Summary
Fields inherited from interface spoon.reflect.declaration.CtExecutable
EXECUTABLE_SEPARATOR -
Method Summary
Modifier and TypeMethodDescriptionclone()Clone the element which calls this method in a new object.Gets the default expression assigned to the annotation method.<T1 extends CtBodyHolder>
T1setBody(CtStatement body)Sets the body of this element.<C extends CtAnnotationMethod<T>>
CsetDefaultExpression(CtExpression<T> assignedExpression)Sets the default expression assigned to the annotation method.<T extends CtFormalTypeDeclarer>
TsetFormalCtTypeParameters(List<CtTypeParameter> formalTypeParameters)Sets the type parameters of this generic element.<T1 extends CtExecutable<T>>
T1setParameters(List<CtParameter<?>> parameters)Sets the parameters.<T1 extends CtExecutable<T>>
T1setThrownTypes(Set<CtTypeReference<? extends Throwable>> thrownTypes)Sets the thrown types.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.CtExecutable
addParameter, addParameterAt, addThrownType, getBody, getParameters, getReference, getSignature, getThrownTypes, removeParameter, removeThrownTypeMethods inherited from interface spoon.reflect.declaration.CtFormalTypeDeclarer
addFormalCtTypeParameter, addFormalCtTypeParameterAt, getFormalCtTypeParameters, removeFormalCtTypeParameterMethods inherited from interface spoon.reflect.declaration.CtMethod
copyMethod, getTopDefinitions, isDefaultMethod, isOverriding, setDefaultMethodMethods 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
getSimpleName, 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.CtTypedElement
getType, setTypeMethods 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
-
getDefaultExpression
CtExpression<T> getDefaultExpression()Gets the default expression assigned to the annotation method. -
setDefaultExpression
Sets the default expression assigned to the annotation method. -
clone
CtAnnotationMethod<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 interfaceCtExecutable<T>- Specified by:
clonein interfaceCtMethod<T>- Specified by:
clonein interfaceCtNamedElement
-
setBody
Description copied from interface:CtBodyHolderSets the body of this element. If body is not a block, it is wrapped in a CtBlock which is semantically equivalent and eases transformation afterwards if required.- Specified by:
setBodyin interfaceCtBodyHolder
-
setThrownTypes
<T1 extends CtExecutable<T>> T1 setThrownTypes(Set<CtTypeReference<? extends Throwable>> thrownTypes)Description copied from interface:CtExecutableSets the thrown types.- Specified by:
setThrownTypesin interfaceCtExecutable<T>
-
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
-
setParameters
Description copied from interface:CtExecutableSets the parameters.- Specified by:
setParametersin interfaceCtExecutable<T>
-