public class ClassInfo extends Object implements Comparable<ClassInfo>
Modifier and Type | Class and Description |
---|---|
static class |
ClassInfo.ClassType
The class type to return.
|
static class |
ClassInfo.RelType |
Modifier and Type | Field and Description |
---|---|
boolean |
classfileScanned
True when a class has been scanned (i.e.
|
String |
className
Name of the class/interface/annotation.
|
Map<String,Object> |
fieldValues
The static constant initializer values of static final fields, if a StaticFinalFieldMatchProcessor matched a
field in this class.
|
Map<ClassInfo.RelType,Set<ClassInfo>> |
relatedTypeToClassInfoSet
The set of classes related to this one.
|
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(String annotationName,
Map<String,ClassInfo> classNameToClassInfo) |
void |
addFieldConstantValue(String fieldName,
Object constValue) |
void |
addFieldType(String fieldTypeName,
Map<String,ClassInfo> classNameToClassInfo) |
void |
addImplementedInterface(String interfaceName,
Map<String,ClassInfo> classNameToClassInfo) |
boolean |
addRelatedClass(ClassInfo.RelType relType,
ClassInfo classInfo)
Add a ClassInfo objects for the given relationship type.
|
boolean |
addRelatedClasses(ClassInfo.RelType relType,
Collection<ClassInfo> classInfoSetToAdd)
Add a ClassInfo objects for the given relationship type.
|
static ClassInfo |
addScannedClass(String className,
boolean isInterface,
boolean isAnnotation,
Map<String,ClassInfo> classNameToClassInfo)
Add a class that has just been scanned (as opposed to just referenced by a scanned class).
|
void |
addSuperclass(String superclassName,
Map<String,ClassInfo> classNameToClassInfo) |
int |
compareTo(ClassInfo o) |
boolean |
equals(Object obj) |
static Set<ClassInfo> |
filterClassInfo(Set<ClassInfo> classInfoSet,
boolean removeExternalClasses,
ClassInfo.ClassType... classTypes)
Get the ClassInfo objects for the classes related to this one in the specified way.
|
static List<String> |
getClassNames(Collection<ClassInfo> classInfoColl)
Get the sorted list of the names of classes given a set of ClassInfo objects.
|
Set<ClassInfo> |
getReachableClasses(ClassInfo.RelType relType)
Find all ClassInfo nodes reachable from this ClassInfo node over the given relationship type links (not
including this class itself).
|
Set<ClassInfo> |
getRelatedClasses(ClassInfo.RelType relType)
Get the ClassInfo objects for the classes related to this one in the specified way.
|
static Set<ClassInfo> |
getRelatedClasses(String className,
Map<String,ClassInfo> classNameToClassInfo,
ClassInfo.RelType relType)
Get the ClassInfo objects for the classes related to the named class in the specified way.
|
int |
hashCode() |
boolean |
isAnnotation()
Returns true if this ClassInfo corresponds to an annotation.
|
boolean |
isImplementedInterface()
Returns true if this ClassInfo corresponds to an "implemented interface" (meaning a non-annotation interface,
or an annotation that has also been implemented as an interface by some class).
|
boolean |
isStandardClass()
Regular classes are not annotations, and should not be interfaces, but to be robust, even if it's an
interface, check if there are super- or sub-classes (if the classpath can contain two versions of a class,
once with it defined as a class, and once with it defined as an interface -- classpath masking should fix
this, but this is to fix problems like issue #38 in future).
|
String |
toString() |
public String className
public boolean classfileScanned
public Map<ClassInfo.RelType,Set<ClassInfo>> relatedTypeToClassInfoSet
public ClassInfo(String className)
public static Set<ClassInfo> filterClassInfo(Set<ClassInfo> classInfoSet, boolean removeExternalClasses, ClassInfo.ClassType... classTypes)
public static List<String> getClassNames(Collection<ClassInfo> classInfoColl)
public Set<ClassInfo> getRelatedClasses(ClassInfo.RelType relType)
public Set<ClassInfo> getReachableClasses(ClassInfo.RelType relType)
public static Set<ClassInfo> getRelatedClasses(String className, Map<String,ClassInfo> classNameToClassInfo, ClassInfo.RelType relType)
public boolean addRelatedClass(ClassInfo.RelType relType, ClassInfo classInfo)
public boolean addRelatedClasses(ClassInfo.RelType relType, Collection<ClassInfo> classInfoSetToAdd)
public boolean isAnnotation()
public boolean isImplementedInterface()
public boolean isStandardClass()
public void addSuperclass(String superclassName, Map<String,ClassInfo> classNameToClassInfo)
public void addAnnotation(String annotationName, Map<String,ClassInfo> classNameToClassInfo)
public void addImplementedInterface(String interfaceName, Map<String,ClassInfo> classNameToClassInfo)
public void addFieldType(String fieldTypeName, Map<String,ClassInfo> classNameToClassInfo)
public static ClassInfo addScannedClass(String className, boolean isInterface, boolean isAnnotation, Map<String,ClassInfo> classNameToClassInfo)
public int compareTo(ClassInfo o)
compareTo
in interface Comparable<ClassInfo>
Copyright © 2016. All rights reserved.