Class CtAnnotationMethodImpl<T>
java.lang.Object
spoon.support.reflect.declaration.CtElementImpl
spoon.support.reflect.declaration.CtNamedElementImpl
spoon.support.reflect.declaration.CtExecutableImpl<T>
spoon.support.reflect.declaration.CtMethodImpl<T>
spoon.support.reflect.declaration.CtAnnotationMethodImpl<T>
- All Implemented Interfaces:
Serializable,Cloneable,FactoryAccessor,CtBodyHolder,SourcePositionHolder,CtAnnotationMethod<T>,CtElement,CtExecutable<T>,CtFormalTypeDeclarer,CtMethod<T>,CtModifiable,CtNamedElement,CtShadowable,CtTypedElement<T>,CtTypeMember,CtQueryable,CtVisitable
The implementation for
CtAnnotationMethod.- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class spoon.support.reflect.declaration.CtElementImpl
ERROR_MESSAGE_TO_STRING, factory, LOGGER, parentFields inherited from interface spoon.reflect.declaration.CtExecutable
EXECUTABLE_SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAccepts a visitorclone()Clone the element which calls this method in a new object.getBody()Gets the body expression.Gets the default expression assigned to the annotation method.Returns the formal type parameters of this generic element.List<CtParameter<?>>Gets the parameters list.Set<CtTypeReference<? extends Throwable>>Returns the exceptions and other throwables listed in this method or constructor's throws clause.<T extends CtBodyHolder>
TsetBody(CtStatement statement)Sets the body of this element.<C extends CtAnnotationMethod<T>>
CsetDefaultExpression(CtExpression<T> assignedExpression)Sets the default expression assigned to the annotation method.<C extends CtFormalTypeDeclarer>
CsetFormalCtTypeParameters(List<CtTypeParameter> formalTypeParameters)Sets the type parameters of this generic element.<U extends CtExecutable<T>>
UsetParameters(List<CtParameter<?>> parameters)Sets the parameters.<U extends CtExecutable<T>>
UsetThrownTypes(Set<CtTypeReference<? extends Throwable>> thrownTypes)Sets the thrown types.Methods inherited from class spoon.support.reflect.declaration.CtMethodImpl
addFormalCtTypeParameter, addFormalCtTypeParameterAt, addModifier, copyMethod, getExtendedModifiers, getModifiers, getTopDefinitions, getType, getVisibility, hasModifier, isAbstract, isDefaultMethod, isFinal, isNative, isOverriding, isPrivate, isProtected, isPublic, isShadow, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, removeFormalCtTypeParameter, removeModifier, setDefaultMethod, setExtendedModifiers, setModifiers, setShadow, setType, setVisibilityMethods inherited from class spoon.support.reflect.declaration.CtExecutableImpl
addParameter, addParameterAt, addThrownType, getDeclaringType, getReference, getSignature, getTopLevelType, removeParameter, removeThrownTypeMethods inherited from class spoon.support.reflect.declaration.CtNamedElementImpl
getSimpleName, setSimpleNameMethods inherited from class spoon.support.reflect.declaration.CtElementImpl
addAnnotation, addComment, asIterable, comment, delete, descendantIterator, emptyList, emptySet, equals, 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, setComments, setDocComment, setFactory, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, unmodifiableList, updateAllParentsBelowMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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, getReference, getSignature, removeParameter, removeThrownTypeMethods inherited from interface spoon.reflect.declaration.CtFormalTypeDeclarer
addFormalCtTypeParameter, addFormalCtTypeParameterAt, 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.processing.FactoryAccessor
getFactory, setFactory
-
Constructor Details
-
CtAnnotationMethodImpl
public CtAnnotationMethodImpl()
-
-
Method Details
-
accept
Description copied from interface:CtVisitableAccepts a visitor- Specified by:
acceptin interfaceCtVisitable- Overrides:
acceptin classCtMethodImpl<T>
-
getDefaultExpression
Description copied from interface:CtAnnotationMethodGets the default expression assigned to the annotation method.- Specified by:
getDefaultExpressionin interfaceCtAnnotationMethod<T>
-
setDefaultExpression
public <C extends CtAnnotationMethod<T>> C setDefaultExpression(CtExpression<T> assignedExpression)Description copied from interface:CtAnnotationMethodSets the default expression assigned to the annotation method.- Specified by:
setDefaultExpressionin interfaceCtAnnotationMethod<T>
-
getBody
Description copied from interface:CtExecutableGets the body expression.- Specified by:
getBodyin interfaceCtBodyHolder- Specified by:
getBodyin interfaceCtExecutable<T>- Overrides:
getBodyin classCtExecutableImpl<T>
-
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 interfaceCtAnnotationMethod<T>- Specified by:
setBodyin interfaceCtBodyHolder- Overrides:
setBodyin classCtExecutableImpl<T>
-
getThrownTypes
Description copied from interface:CtExecutableReturns the exceptions and other throwables listed in this method or constructor's throws clause.- Specified by:
getThrownTypesin interfaceCtExecutable<T>- Overrides:
getThrownTypesin classCtExecutableImpl<T>
-
setThrownTypes
public <U extends CtExecutable<T>> U setThrownTypes(Set<CtTypeReference<? extends Throwable>> thrownTypes)Description copied from interface:CtExecutableSets the thrown types.- Specified by:
setThrownTypesin interfaceCtAnnotationMethod<T>- Specified by:
setThrownTypesin interfaceCtExecutable<T>- Overrides:
setThrownTypesin classCtExecutableImpl<T>
-
getFormalCtTypeParameters
Description copied from interface:CtFormalTypeDeclarerReturns the formal type parameters of this generic element.- Specified by:
getFormalCtTypeParametersin interfaceCtFormalTypeDeclarer- Overrides:
getFormalCtTypeParametersin classCtMethodImpl<T>
-
setFormalCtTypeParameters
public <C extends CtFormalTypeDeclarer> C setFormalCtTypeParameters(List<CtTypeParameter> formalTypeParameters)Description copied from interface:CtFormalTypeDeclarerSets the type parameters of this generic element.- Specified by:
setFormalCtTypeParametersin interfaceCtAnnotationMethod<T>- Specified by:
setFormalCtTypeParametersin interfaceCtFormalTypeDeclarer- Overrides:
setFormalCtTypeParametersin classCtMethodImpl<T>
-
getParameters
Description copied from interface:CtExecutableGets the parameters list.- Specified by:
getParametersin interfaceCtExecutable<T>- Overrides:
getParametersin classCtExecutableImpl<T>
-
setParameters
Description copied from interface:CtExecutableSets the parameters.- Specified by:
setParametersin interfaceCtAnnotationMethod<T>- Specified by:
setParametersin interfaceCtExecutable<T>- Overrides:
setParametersin classCtExecutableImpl<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 interfaceCtAnnotationMethod<T>- Specified by:
clonein interfaceCtElement- Specified by:
clonein interfaceCtExecutable<T>- Specified by:
clonein interfaceCtMethod<T>- Specified by:
clonein interfaceCtNamedElement- Overrides:
clonein classCtMethodImpl<T>
-