Package spoon.support.visitor.java
Class JavaReflectionTreeBuilder
java.lang.Object
spoon.support.visitor.java.JavaReflectionTreeBuilder
Builds Spoon model from class file using the reflection api. The Spoon model
contains only the declaration part (type, field, method, etc.). Everything
that isn't available with the reflection api is absent from the model. Those
models are available when
CtTypeReference.getTypeDeclaration(),
CtExecutableReference.getExecutableDeclaration() and
CtFieldReference.getFieldDeclaration() are called. To know when an
element comes from the reflection api, use CtShadowable.isShadow().-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T, R extends CtType<T>>
Rtransforms a java.lang.Class into a CtType (ie a shadow type in Spoon's parlance)voidvisitAnnotation(Annotation annotation)<T extends Annotation>
voidvisitAnnotationClass(Class<T> clazz)<T> voidvisitArrayReference(CtRole role, Type typeArray)<T> voidvisitClass(Class<T> clazz)<T> voidvisitConstructor(Constructor<T> constructor)<T> voidvoidvisitEnumValue(Field field)voidvisitField(Field field)<T> voidvisitInterface(Class<T> clazz)voidvisitMethod(RtMethod method)voidvisitMethod(RtMethod method, Annotation parent)voidvisitPackage(Package aPackage)voidvisitParameter(RtParameter parameter)<T> voidvisitRecord(Class<T> clazz)voidvisitRecordComponent(AnnotatedElement recordComponent)protected <T> void<T extends GenericDeclaration>
voidvisitTypeParameter(TypeVariable<T> parameter)<T extends GenericDeclaration>
voidvisitTypeParameterReference(CtRole role, TypeVariable<T> parameter)<T> voidvisitTypeReference(CtRole role, Class<T> clazz)voidvisitTypeReference(CtRole role, ParameterizedType type)voidvisitTypeReference(CtRole role, Type type)voidvisitTypeReference(CtRole role, WildcardType type)
-
Constructor Details
-
JavaReflectionTreeBuilder
-
-
Method Details
-
scan
transforms a java.lang.Class into a CtType (ie a shadow type in Spoon's parlance) -
visitPackage
-
visitClass
-
visitInterface
-
visitEnum
-
visitAnnotationClass
-
visitAnnotation
-
visitConstructor
-
visitMethod
-
visitField
-
visitEnumValue
-
visitParameter
-
visitTypeParameter
-
visitTypeParameterReference
public <T extends GenericDeclaration> void visitTypeParameterReference(CtRole role, TypeVariable<T> parameter) -
visitTypeReference
-
visitTypeReference
-
visitArrayReference
-
visitTypeReference
-
visitRecord
-
visitRecordComponent
-
visitType
-
visitMethod
-
visitTypeReference
-