Uses of Annotation Type
spoon.support.DerivedProperty
Package
Description
This package contains the meta-model part that models the executable code (methods and constructors' bodies, field initializers).
This package contains the meta-model part that models the declarations (program's structures such as classes, fields, etc).
This package defines the references to program elements for the meta-model.
-
Uses of DerivedProperty in spoon.reflect.code
Modifier and TypeMethodDescriptionList<CtTypeReference<?>>
CtConstructorCall.getActualTypeArguments()
Delegate to the executable reference of the constructor call.List<CtTypeReference<?>>
CtInvocation.getActualTypeArguments()
Delegate to the executable reference of the invocation.List<CtTypeReference<?>>
CtNewClass.getActualTypeArguments()
Delegate to the executable reference of the new class.CtLocalVariable.getAssignment()
Useful proxy toCtVariable.getDefaultExpression()
.CtJavaDoc.getJavadocElements()
Returns the list of parsed Javadoc elementsCtLabelledFlowBreak.getLabelledStatement()
<T extends CtStatement>
TCtStatementList.getLastStatement()
Gets the last statement of this block.CtJavaDoc.getLongDescription()
Get the long description of the javadoc<R> CtMethod<R>
CtLambda.getOverriddenMethod()
CtComment.getRawContent()
CtCatchVariable.getReference()
CtLocalVariable.getReference()
CtJavaDoc.getShortDescription()
Get the short summary of the javadoc (first sentence of the javadoc)<T extends CtStatement>
TCtStatementList.getStatement(int i)
Gets the ith statement of this block.CtCatchVariable.getType()
Returns type reference of the exception variable in a catch.CtConstructorCall.getType()
CtInvocation.getType()
Return the type returned by the invocation.CtSuperAccess.getType()
CtTypeAccess.getType()
Returns always VOID.CtVariableAccess.getType()
<T extends CtStatementList>
TCtStatementList.insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
Inserts the given statement after a set of insertion points given by a filter.<T extends CtStatementList>
TCtStatementList.insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
Inserts the given statement list after a set of insertion points given by a filter.<T extends CtStatementList>
TCtStatementList.insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement)
Inserts the given statement before a set of insertion points given by a filter.<T extends CtStatementList>
TCtStatementList.insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatementList statements)
Inserts the given statement list before a set of insertion points given by a filter.boolean
CtTypeAccess.isImplicit()
<E extends CtElement>
ECtTypeAccess.setImplicit(boolean implicit)
CallsCtTypeAccess.getAccessedType()
.setImplicit() -
Uses of DerivedProperty in spoon.reflect.declaration
Modifier and TypeMethodDescriptionCtCompilationUnit.addDeclaredType(CtType<?> type)
Add a type to the list of declared types.<T extends CtModule>
TCtModule.addExportedPackage(CtPackageExport exportedPackage)
<T extends CtModule>
TCtModule.addOpenedPackage(CtPackageExport openedPackage)
<T extends CtModule>
TCtModule.addProvidedService(CtProvidedService providedService)
<T extends CtModule>
TCtModule.addRequiredModule(CtModuleRequirement requiredModule)
<T extends CtModule>
TCtModule.addUsedService(CtUsedService usedService)
CtAnnotation.getActualAnnotation()
Returns the actual annotation (a dynamic proxy for this element).CtType.getActualClass()
This is a low-level feature, it should never been used by non advanced users.CtTypeInformation.getAllExecutables()
Gets the executables declared by this type and by all its supertypes (static/instance methods, constructors, anonymous static blocks) if applicable.CtTypeInformation.getAllFields()
Gets the fields declared by this type and by all its supertypes if applicable.CtType.getAllMethods()
Return all the methods that can be called on an instance of this type.CtAnnotation.getAllValues()
Get all values ofCtAnnotation.getValues()
, plus the default ones defined in the annotation type.CtAnnotation.getAnnotatedElement()
Returns the element which is annotated by this annotation.CtAnnotation.getAnnotatedElementType()
Returns the type of the element which is annotated by this annotation.CtAnnotationType.getAnnotationMethods()
CtClass.getAnonymousExecutables()
Returns the anonymous blocks of this class.CtField.getAssignment()
Useful proxy toCtVariable.getDefaultExpression()
.CtClass.getConstructor(CtTypeReference<?>... parameterTypes)
Returns the constructor of the class that takes the given argument types.CtClass.getConstructors()
Returns the constructors of this class.CtTypeInformation.getDeclaredExecutables()
Gets the executables declared by this type if applicable.CtTypeInformation.getDeclaredFields()
Gets the fields declared by this type.CtCompilationUnit.getDeclaredModule()
Gets the declared module if the compilationUnit is "module-info.java"CtCompilationUnit.getDeclaredPackage()
Gets the declared packageCtCompilationUnit.getDeclaredTypes()
Gets all the types declared in this compilation unit.CtPackage.getDeclaringModule()
Gets the declaring module.CtPackage.getDeclaringPackage()
Gets the declaring package of the current one.CtType<?>
CtTypeMember.getDeclaringType()
Gets the type that declares this class member.CtElement.getDocComment()
Returns the text of the documentation ("javadoc") comment of this element.CtModule.getExportedPackages()
CtType.getFields()
Returns the fields that are directly declared by this class or interface.CtImport.getImportKind()
Returns the kind of import (seeCtImportKind
)CtType<?>
CtCompilationUnit.getMainType()
Searches and returns the main type (the type which has the same name as the file).CtType.getMethods()
Returns the methods that are directly declared by this class or interface.CtAnnotation.getName()
Returns the class name of the annotation, eg "Deprecated" for @Deprecated.CtType.getNestedTypes()
Returns the declarations of the nested classes and interfaces that are directly declared by this class or interface.CtModule.getOpenedPackages()
CtType.getPackage()
Gets the package where this type is declared.CtCompilationUnit.getParent()
CtElement.getParent()
Gets the parent of current reference.CtExecutable<?>
CtParameter.getParent()
Gets the executable that is the parent declaration of this parameter declaration.Set<CtTypeReference<?>>
CtEnum.getPermittedTypes()
CtModule.getProvidedServices()
CtTypeInformation.getQualifiedName()
Returns the fully qualified name of this type declaration.CtExecutable.getReference()
CtField.getReference()
CtModule.getReference()
CtNamedElement.getReference()
Returns the corresponding reference.CtPackage.getReference()
CtParameter.getReference()
overriding the return typeCtType.getReference()
Returns the corresponding type reference.CtTypeParameter.getReference()
override the return typeCtVariable.getReference()
Set<CtTypeReference<?>>
CtElement.getReferencedTypes()
Calculates and returns the set of all the types referenced by this element (and sub-elements in the AST).CtModule.getRequiredModules()
CtElement.getShortRepresentation()
Build a short representation of any element.<T> CtType<T>
CtTypeMember.getTopLevelType()
Returns the top level type declaring this type if an inner type or type member.CtTypeInformation.getTypeErasure()
This method returns a reference to the erased type.CtTypeParameter.getTypeParameterDeclarer()
CtModule.getUsedServices()
int
CtAnnotation.getValueAsInt(String key)
Returns the actual value of an annotation property, as an integer (utility method)CtAnnotation.getValueAsObject(String key)
Returns the actual value of an annotation propertyCtAnnotation.getValueAsString(String key)
Returns the actual value of an annotation property, as a String (utility method)CtModifiable.getVisibility()
Gets the visibility of this modifiable element.<T extends CtExpression>
TCtAnnotation.getWrappedValue(String key)
Gets a value for a given key and try to fix its type based on the annotation type.<A extends Annotation>
booleanCtElement.hasAnnotation(Class<A> annotationType)
boolean
CtModifiable.isAbstract()
Returns true if it contains an abstract modifier (seeCtModifiable.hasModifier(ModifierKind)
)boolean
CtModifiable.isFinal()
Returns true if it contains a final modifier (seeCtModifiable.hasModifier(ModifierKind)
)boolean
CtTypeInformation.isGenerics()
Returns true if it is not a concrete, resolvable class, it if refers to a type parameter directly or indirectly.boolean
CtModifiable.isNative()
Returns true if it contains a native modifier (seeCtModifiable.hasModifier(ModifierKind)
)boolean
CtTypeInformation.isParameterized()
Returns true if it has any type parameter (generic or not).boolean
CtVariable.isPartOfJointDeclaration()
Returns true it the variable (field, localvariable) is jointly declared with a share type Eg int a,b; Warning: is computed on demandboolean
CtModifiable.isPrivate()
Returns true if it contains a private modifier (seeCtModifiable.hasModifier(ModifierKind)
)boolean
CtModifiable.isProtected()
Returns true if it contains a protected modifier (seeCtModifiable.hasModifier(ModifierKind)
)boolean
CtModifiable.isPublic()
Returns true if it contains a public modifier (seeCtModifiable.hasModifier(ModifierKind)
)boolean
CtModifiable.isStatic()
Returns true if it contains a static modifier (seeCtModifiable.hasModifier(ModifierKind)
)boolean
CtModifiable.isStrictfp()
Returns true if it contains a strictfp modifier (seeCtModifiable.hasModifier(ModifierKind)
)boolean
CtModifiable.isSynchronized()
Returns true if it contains a synchronized modifier (seeCtModifiable.hasModifier(ModifierKind)
)boolean
CtModifiable.isTransient()
Returns true if it contains a transient modifier (seeCtModifiable.hasModifier(ModifierKind)
)boolean
CtModule.isUnnamedModule()
Returns true if the module is the unnamed moduleboolean
CtModifiable.isVolatile()
Returns true if it contains a volatile modifier (seeCtModifiable.hasModifier(ModifierKind)
)<T extends CtModule>
TCtModule.removeExportedPackage(CtPackageExport exportedPackage)
<T extends CtModule>
TCtModule.removeOpenedPackage(CtPackageExport openedPackage)
<T extends CtModule>
TCtModule.removeProvidedService(CtProvidedService providedService)
<T extends CtModule>
TCtModule.removeRequiredModule(CtModuleRequirement requiredModule)
<T extends CtModule>
TCtModule.removeUsedService(CtUsedService usedService)
CtCompilationUnit.setDeclaredModule(CtModule module)
Sets the declared module if the compilationUnit is "module-info.java" It is here for backward compatibility.CtCompilationUnit.setDeclaredPackage(CtPackage ctPackage)
Sets the package declaration using the instance of CtPackage.CtCompilationUnit.setDeclaredTypes(List<CtType<?>> types)
Sets the types declared in this compilation unit.<T extends CtModule>
TCtModule.setExportedPackages(List<CtPackageExport> exportedPackages)
<T extends CtModule>
TCtModule.setOpenedPackages(List<CtPackageExport> openedPackages)
<T extends CtModule>
TCtModule.setProvidedServices(List<CtProvidedService> providedServices)
<T extends CtModule>
TCtModule.setRequiredModules(List<CtModuleRequirement> requiredModules)
<T extends CtModule>
TCtModule.setUsedServices(List<CtUsedService> usedServices)
CtType.toStringWithImports()
Gets the entire class code with package and imports. -
Uses of DerivedProperty in spoon.reflect.reference
Modifier and TypeMethodDescriptionCtTypeReference.getAccessType()
Computes nearest access path parent to this type from the context of this type reference.List<CtAnnotation<? extends Annotation>>
CtTypeMemberWildcardImportReference.getAnnotations()
CtArrayTypeReference.getArrayType()
Gets the type of the array elements at the finest grain.CtTypeParameterReference.getBoundingType()
A type parameter can have anextends
clause which declare one (CtTypeReference
or more (CtIntersectionTypeReference
references.CtCatchVariableReference.getDeclaration()
CtExecutableReference.getDeclaration()
CtFieldReference.getDeclaration()
CtLocalVariableReference.getDeclaration()
CtModuleReference.getDeclaration()
CtPackageReference.getDeclaration()
Gets the package element when available in the source code.CtParameterReference.getDeclaration()
CtReference.getDeclaration()
Returns the declaration that corresponds to the referenced element only if the declaration is in the analyzed source files.CtType<?>
CtTypeMemberWildcardImportReference.getDeclaration()
CtTypeParameterReference.getDeclaration()
Returns theCtTypeParameter
, aCtTypeParameter
, that declares the type parameter referenced ornull
if the reference is not in a context where such type parameter is declared.CtTypeReference.getDeclaration()
Returns theCtType
, that corresponds to the reference ornull
if the type declaration is not in the analyzed source files,CtTypeReference.getTypeDeclaration()
is a newer and better alternative that less often returns null.CtVariableReference.getDeclaration()
Tries to get the declaration of the reference.CtParameterReference.getDeclaringExecutable()
Gets the declaring executable of the referenced parameter.int
CtArrayTypeReference.getDimensionCount()
Returns the number of dimensions of this array type.CtExecutableReference.getExecutableDeclaration()
Returns a subtypeCtExecutable
that corresponds to the reference even if its declaring type isn't in the Spoon source path (in this case, the Spoon elements are built with runtime reflection).CtFieldReference.getFieldDeclaration()
Returns theCtField
that corresponds to the reference even if its declaring type isn't in the Spoon source path (in this case, the Spoon elements are built with runtime reflection)CtTypeReference.getModifiers()
CtExecutableReference.getOverridingExecutable()
Returns the method overridden by this one, if exists (null otherwise).CtArrayTypeReference.getSimpleName()
Returns the simple name of the array type core component type (with no []s).CtTypeMemberWildcardImportReference.getSimpleName()
Returns the fully qualified name of type followed by `.*`CtTypeReference.getSuperclass()
Set<CtTypeReference<?>>
CtTypeReference.getSuperInterfaces()
CtTypeReference.getTopLevelType()
Returns this, or top level type of this, if this is an inner typeCtTypeReference.getTypeDeclaration()
Returns theCtType
that corresponds to the reference even if the type isn't in the Spoon source path (in this case, the Spoon elements are built with runtime reflection, and the resulting CtType is called a "shadow" class, seeCtShadowable.isShadow()
).CtTypeReference.getTypeParameterDeclaration()
If this type reference is used as a type argument (seeCtActualTypeContainer.getActualTypeArguments()
), returns the type parameter declaration in the target type, returns null otherwise.boolean
CtTypeParameterReference.isDefaultBoundingType()
Returns true if this has the default bounding type that is java.lang.Object (which basically means that there is no bound)boolean
CtTypeMemberWildcardImportReference.isImplicit()
boolean
CtTypeReference.isSimplyQualified()
CtTypeReference.setSimplyQualified(boolean isSimplyQualified)
-
Uses of DerivedProperty in spoon.support.reflect.code
Modifier and TypeMethodDescription<T extends CtActualTypeContainer>
TCtConstructorCallImpl.addActualTypeArgument(CtTypeReference<?> actualTypeArgument)
List<CtTypeReference<?>>
CtConstructorCallImpl.getActualTypeArguments()
CtLocalVariableImpl.getAssignment()
CtCatchVariableImpl.getDefaultExpression()
CtCatchVariableImpl.getType()
CtConstructorCallImpl.getType()
CtInvocationImpl.getType()
CtVariableAccessImpl.getType()
boolean
CtTypeAccessImpl.isImplicit()
boolean
CtConstructorCallImpl.removeActualTypeArgument(CtTypeReference<?> actualTypeArgument)
<T extends CtActualTypeContainer>
TCtConstructorCallImpl.setActualTypeArguments(List<? extends CtTypeReference<?>> actualTypeArguments)
<E extends CtElement>
ECtTypeAccessImpl.setImplicit(boolean implicit)
<C extends CtTypedElement>
CCtConstructorCallImpl.setType(CtTypeReference type)
<C extends CtTypedElement>
CCtInvocationImpl.setType(CtTypeReference type)
<C extends CtTypedElement>
CCtVariableAccessImpl.setType(CtTypeReference type)
-
Uses of DerivedProperty in spoon.support.reflect.declaration
Modifier and TypeMethodDescriptionCtCompilationUnitImpl.addDeclaredType(CtType<?> type)
CtTypeParameterImpl.getAllExecutables()
CtTypeParameterImpl.getAllMethods()
CtEnumValueImpl.getAssignment()
CtFieldImpl.getAssignment()
CtAnnotationMethodImpl.getBody()
CtTypeParameterImpl.getDeclaredExecutables()
CtCompilationUnitImpl.getDeclaredModule()
CtCompilationUnitImpl.getDeclaredPackage()
CtParameterImpl.getDefaultExpression()
CtEnumImpl.getFields()
CtTypeParameterImpl.getFields()
CtAnnotationMethodImpl.getFormalCtTypeParameters()
CtAnnotationTypeImpl.getFormalCtTypeParameters()
CtEnumImpl.getFormalCtTypeParameters()
CtTypeParameterImpl.getFormalCtTypeParameters()
CtTypeParameterImpl.getMethods()
CtTypeParameterImpl.getNestedTypes()
CtTypeParameterImpl.getPackage()
List<CtParameter<?>>
CtAnnotationMethodImpl.getParameters()
List<CtParameter<?>>
CtAnonymousExecutableImpl.getParameters()
CtModuleImpl.getParent()
Set<CtTypeReference<?>>
CtEnumImpl.getPermittedTypes()
Set<CtTypeReference<?>>
CtElementImpl.getReferencedTypes()
CtAnnotationTypeImpl.getSuperclass()
CtEnumImpl.getSuperclass()
CtRecordImpl.getSuperclass()
CtTypeImpl.getSuperclass()
Set<CtTypeReference<?>>
CtAnnotationTypeImpl.getSuperInterfaces()
Set<CtTypeReference<?>>
CtTypeParameterImpl.getSuperInterfaces()
Set<CtTypeReference<? extends Throwable>>
CtAnnotationMethodImpl.getThrownTypes()
Set<CtTypeReference<? extends Throwable>>
CtAnonymousExecutableImpl.getThrownTypes()
CtAnonymousExecutableImpl.getType()
CtConstructorImpl.getType()
List<CtTypeReference<?>>
CtAnnotationImpl.getTypeCasts()
CtTypeParameterImpl.getTypeMembers()
<F> boolean
CtTypeParameterImpl.removeField(CtField<F> field)
CtCompilationUnitImpl.setDeclaredTypes(List<CtType<?>> types)
<T extends CtElement>
T -
Uses of DerivedProperty in spoon.support.reflect.reference
Modifier and TypeMethodDescriptionList<CtTypeReference<?>>
CtTypeParameterReferenceImpl.getActualTypeArguments()
List<CtAnnotation<? extends Annotation>>
CtTypeMemberWildcardImportReferenceImpl.getAnnotations()
List<CtAnnotation<? extends Annotation>>
CtUnboundVariableReferenceImpl.getAnnotations()
CtTypeParameterReferenceImpl.getBoundingType()
CtType<?>
CtTypeMemberWildcardImportReferenceImpl.getDeclaration()
boolean
CtTypeMemberWildcardImportReferenceImpl.isImplicit()
boolean
CtTypeReferenceImpl.isSimplyQualified()
CtTypeReferenceImpl.setSimplyQualified(boolean isSimplyQualified)