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
-
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)void
visitAnnotation(Annotation annotation)
<T extends Annotation>
voidvisitAnnotationClass(Class<T> clazz)
<T> void
visitArrayReference(CtRole role, Type typeArray)
<T> void
visitClass(Class<T> clazz)
<T> void
visitConstructor(Constructor<T> constructor)
<T> void
void
visitEnumValue(Field field)
void
visitField(Field field)
<T> void
visitInterface(Class<T> clazz)
void
visitMethod(RtMethod method)
void
visitMethod(RtMethod method, Annotation parent)
void
visitPackage(Package aPackage)
void
visitParameter(RtParameter parameter)
<T> void
visitRecord(Class<T> clazz)
void
visitRecordComponent(AnnotatedElement recordComponent)
protected <T> void
<T extends GenericDeclaration>
voidvisitTypeParameter(TypeVariable<T> parameter)
<T extends GenericDeclaration>
voidvisitTypeParameterReference(CtRole role, TypeVariable<T> parameter)
<T> void
visitTypeReference(CtRole role, Class<T> clazz)
void
visitTypeReference(CtRole role, ParameterizedType type)
void
visitTypeReference(CtRole role, Type type)
void
visitTypeReference(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
-