public abstract class ClassPathIntrospector extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ClassPathIntrospector(ClassPathIntrospector otherIntrospector)
Creates a new instance of class path introspector using the
otherIntrpespector's reflection tools. |
protected |
ClassPathIntrospector(URL... projectClassesLocations)
Creates a new instance of class path introspector using the
projectClassesLocations. |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
doInvokeAnnotationMethod(Annotation target,
String methodName)
Get the value of the method
methodName from the target
annotation. |
protected Stream<Class<?>> |
getAnnotatedClasses(Class<? extends Annotation> annotationInProjectContext)
Gets the classes annotated with the given
annotationInProjectContext annotation. |
protected String |
invokeAnnotationMethod(Annotation target,
String methodName)
Get the String value of the method
methodName from the
target annotation. |
protected <T> Class<T> |
loadClassInProjectClassLoader(String className)
Returns the annotation class by its FQN.
|
protected ClassPathIntrospector(URL... projectClassesLocations)
projectClassesLocations.projectClassesLocations - urls to project class locations (directories, jars etc.)protected ClassPathIntrospector(ClassPathIntrospector otherIntrospector)
otherIntrpespector's reflection tools.otherIntrospector - the introspector whose reflection tools will be reusedprotected Stream<Class<?>> getAnnotatedClasses(Class<? extends Annotation> annotationInProjectContext)
annotationInProjectContext annotation.annotationInProjectContext - annotation classprotected <T> Class<T> loadClassInProjectClassLoader(String className)
Note that the resulting class is loaded by project classloader ( not the maven plugin classloader).
T - the class to be loadedclassName - the FQN of the class to loadclassName loaded by the project
class loaderprotected String invokeAnnotationMethod(Annotation target, String methodName)
methodName from the
target annotation.target - the target annotationmethodName - the method name to executeprotected Object doInvokeAnnotationMethod(Annotation target, String methodName)
methodName from the target
annotation.target - the target annotationmethodName - the method name to executemethodName invocation on the
targetCopyright © 2025. All rights reserved.