Class MetaStore
java.lang.Object
dxt.scanpath.v2.mstore.MetaStore
Stores relationships discovered while scanning class metadata.
The store tracks inheritance, class annotations, field annotations, and method annotations, and can resolve the recorded class names through its configured class loader.
- Author:
- indroneel
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty metadata store using the current thread's context class loader when available. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClassWithAnnotation(String ann, String clsName) Records a class that has the specified class-level annotation.voidaddClassWithFieldAnnotation(String ann, String clsName) Records a class that has a field with the specified annotation.voidaddClassWithMethodAnnotation(String ann, String clsName) Records a class that has a method with the specified annotation.voidaddInheritance(String baseName, String clsName) Records that a class inherits from a base class or interface.Produces a human-readable representation of all recorded relationships.Resolves and returns classes recorded with the supplied class-level annotation.Resolves and returns classes recorded with fields carrying the supplied annotation.Resolves and returns classes recorded with methods carrying the supplied annotation.listInheritingClasses(String baseName) Resolves and returns classes recorded as inheriting from the supplied base type.voidSets the class loader used when resolving recorded class names.
-
Constructor Details
-
MetaStore
public MetaStore()Creates an empty metadata store using the current thread's context class loader when available.
-
-
Method Details
-
setClassLoader
Sets the class loader used when resolving recorded class names.If
clisnull, the thread context loader and then this class's loader are used as fallbacks.- Parameters:
cl- the class loader to use, ornullto select a fallback loader
-
addInheritance
-
addClassWithAnnotation
-
addClassWithFieldAnnotation
-
addClassWithMethodAnnotation
-
listInheritingClasses
-
listAnnotatedClasses
-
listClassesWithAnnotatedFields
-
listClassesWithAnnotatedMethods
-
dumpState
-