public class ClassGraphBuilder extends Object
Constructor and Description |
---|
ClassGraphBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
addStaticFinalFieldProcessor(String className,
String fieldName,
StaticFinalFieldMatchProcessor staticFinalFieldMatchProcessor)
Add a StaticFinalFieldMatchProcessor that should be called if a static final field with the given name is
encountered in a class with the given fully-qualified classname while reading a classfile header.
|
void |
finalizeGraph()
Find all superclasses and subclasses for each class and superinterfaces and subinterfaces of each interface.
|
Set<String> |
getNamesOfAllClasses()
Return all class names reached during the scan.
|
List<String> |
getNamesOfClassesImplementing(String interfaceName)
Return the names of all classes implementing the named interface.
|
List<String> |
getNamesOfClassesWithAnnotation(String annotationName)
Return the names of all classes with the named class annotation.
|
List<String> |
getNamesOfClassesWithMetaAnnotation(String metaAnnotation)
Return the names of all classes with the named class meta-annotation (i.e.
|
List<String> |
getNamesOfSubclassesOf(String className)
Return the names of all subclasses of the named class.
|
List<String> |
getNamesOfSubinterfacesOf(String interfaceName)
Return the names of all subinterfaces of the named interface.
|
List<String> |
getNamesOfSuperclassesOf(String className)
Return the names of all superclasses of the named class.
|
List<String> |
getNamesOfSuperinterfacesOf(String interfaceName)
Return the names of all superinterfaces of the named interface.
|
void |
readClassInfoFromClassfileHeader(InputStream inputStream,
boolean verbose)
Directly examine contents of classfile binary header.
|
void |
reset() |
public void addStaticFinalFieldProcessor(String className, String fieldName, StaticFinalFieldMatchProcessor staticFinalFieldMatchProcessor)
public List<String> getNamesOfClassesWithAnnotation(String annotationName)
public List<String> getNamesOfClassesWithMetaAnnotation(String metaAnnotation)
public List<String> getNamesOfClassesImplementing(String interfaceName)
public List<String> getNamesOfSubclassesOf(String className)
public List<String> getNamesOfSuperclassesOf(String className)
public List<String> getNamesOfSubinterfacesOf(String interfaceName)
public List<String> getNamesOfSuperinterfacesOf(String interfaceName)
public Set<String> getNamesOfAllClasses()
public void finalizeGraph()
public void reset()
public void readClassInfoFromClassfileHeader(InputStream inputStream, boolean verbose) throws IOException
verbose
- IOException
Copyright © 2015. All rights reserved.