public class ClassInfo extends Object implements Comparable<ClassInfo>
Modifier and Type | Method and Description |
---|---|
boolean |
annotatesClass(String annotatedClassName)
Returns true if this class annotates the named class.
|
int |
compareTo(ClassInfo o) |
boolean |
directlyAnnotatesClass(String directlyAnnotatedClassName)
Returns true if this class annotates the named class.
|
boolean |
directlyImplementsInterface(String interfaceName)
Returns true if this standard class directly implements the named interface, or by one of its superclasses.
|
boolean |
equals(Object obj) |
Set<ClassInfo> |
getAnnotations()
Return the set of all annotations and meta-annotations on this class or interface, or meta-annotations if
this is an annotation.
|
Set<ClassInfo> |
getAnnotationsWithDirectMetaAnnotation()
Return the set of all annotations that have this direct meta-annotation.
|
Set<ClassInfo> |
getAnnotationsWithMetaAnnotation()
Return the set of all annotations that have this meta-annotation.
|
Set<ClassInfo> |
getClassesDirectlyImplementing()
Return the set of all class directly implementing this interface.
|
Set<ClassInfo> |
getClassesImplementing()
Return the set of all class implementing this interface, and all their subclasses.
|
Set<ClassInfo> |
getClassesWithAnnotation()
Return the set of all standard classes or non-annotation interfaces that this annotation class annotates.
|
String |
getClassName()
Get the name of this class.
|
static List<String> |
getClassNames(Collection<ClassInfo> classInfoColl)
Get the sorted list of the names of classes given a collection of ClassInfo objects.
|
Set<ClassInfo> |
getDirectAnnotations()
Return the set of all direct annotations and meta-annotations on this class or interface, or of direct
meta-annotations if this is an annotation.
|
Set<ClassInfo> |
getDirectlyAnnotatedClasses()
Return the set of all standard classes or non-annotation interfaces that are directly annotated with this
annotation class.
|
Set<ClassInfo> |
getDirectlyImplementedInterfaces()
Return the set of all interfaces directly implemented by this standard class, or by one of its superclasses.
|
Set<ClassInfo> |
getDirectSubclasses()
Return the set of all direct subclasses.
|
Set<ClassInfo> |
getDirectSubinterfaces()
Return the set of all direct subinterfaces of an interface.
|
Set<ClassInfo> |
getDirectSuperclasses()
Return the set of all direct superclasses.
|
Set<ClassInfo> |
getDirectSuperinterfaces()
Return the set of all direct superinterfaces of an interface.
|
List<String> |
getFieldTypes()
Return the sorted list of names of field types.
|
Set<ClassInfo> |
getImplementedInterfaces()
Return the set of all interfaces implemented by this standard class, or by one of its superclasses.
|
Set<ClassInfo> |
getMetaAnnotations()
Return the set of all annotations and meta-annotations, if this is an annotation class.
|
List<String> |
getNamesOfAnnotations()
Return the sorted list of names of all annotations and meta-annotations on this class or interface, or
meta-annotations if this is an annotation.
|
List<String> |
getNamesOfAnnotationsWithDirectMetaAnnotation()
Return the sorted list of names of all annotations that have this direct meta-annotation.
|
List<String> |
getNamesOfAnnotationsWithMetaAnnotation()
Return the sorted list of names of all annotations that have this meta-annotation.
|
List<String> |
getNamesOfClassesDirectlyImplementing()
Return the names of all classes directly implementing this interface.
|
List<String> |
getNamesOfClassesImplementing()
Return the names of all classes implementing this interface, and all their subclasses.
|
List<String> |
getNamesOfClassesWithAnnotation()
Return the sorted list of names of all standard classes or non-annotation interfaces with this class as a
class annotation or meta-annotation.
|
List<String> |
getNamesOfDirectAnnotations()
Return the sorted list of names of all direct annotations and meta-annotations on this class or interface, or
of direct meta-annotations if this is an annotation.
|
List<String> |
getNamesOfDirectlyAnnotatedClasses()
Return the sorted list of names of all standard classes or non-annotation interfaces that are directly
annotated with this annotation class.
|
List<String> |
getNamesOfDirectlyImplementedInterfaces()
Return the set of all interfaces directly implemented by this standard class, or by one of its superclasses.
|
List<String> |
getNamesOfDirectSubclasses()
Return the sorted list of names of all direct subclasses.
|
List<String> |
getNamesOfDirectSubinterfaces()
Return the sorted list of names of all direct subinterfaces of an interface.
|
List<String> |
getNamesOfDirectSuperclasses()
Return the sorted list of names of all direct superclasses.
|
List<String> |
getNamesOfDirectSuperinterfaces()
Return the names of all direct superinterfaces of an interface.
|
List<String> |
getNamesOfImplementedInterfaces()
Return the set of all interfaces implemented by this standard class, or by one of its superclasses.
|
List<String> |
getNamesOfMetaAnnotations()
Return the sorted list of names of all annotations and meta-annotations, if this is an annotation class.
|
List<String> |
getNamesOfSubclasses()
Return the sorted list of names of all subclasses.
|
List<String> |
getNamesOfSubinterfaces()
Return the sorted list of names of all subinterfaces of an interface.
|
List<String> |
getNamesOfSuperclasses()
Return the sorted list of names of all superclasses.
|
List<String> |
getNamesOfSuperinterfaces()
Return the sorted list of names of all superinterfaces of an interface.
|
Set<ClassInfo> |
getSubclasses()
Return the set of all subclasses.
|
Set<ClassInfo> |
getSubinterfaces()
Return the set of all subinterfaces of an interface.
|
Set<ClassInfo> |
getSuperclasses()
Return the set of all superclasses.
|
Set<ClassInfo> |
getSuperinterfaces()
Return the set of all superinterfaces of an interface.
|
boolean |
hasAnnotation(String annotationName)
Returns true if this class, interface or annotation has the named class annotation or meta-annotation.
|
boolean |
hasDirectAnnotation(String directAnnotationName)
Returns true if this class has the named direct annotation or meta-annotation.
|
boolean |
hasDirectMetaAnnotation(String directMetaAnnotationName)
Returns true if this annotation is directly meta-annotated with the named annotation.
|
boolean |
hasDirectSubclass(String directSubclassName)
Returns true if this class has the named direct subclass.
|
boolean |
hasDirectSubinterface(String directSubinterfaceName)
Returns true if this class is and interface and has the named direct subinterface.
|
boolean |
hasDirectSuperclass(String directSuperclassName)
Returns true if this class has the named direct subclass.
|
boolean |
hasDirectSuperinterface(String directSuperinterfaceName)
Returns true if this class is an interface and has the named direct superinterface.
|
int |
hashCode() |
boolean |
hasMetaAnnotation(String metaAnnotationName)
Returns true if this is an annotation class and it has the named meta-annotation.
|
boolean |
hasSubclass(String subclassName)
Returns true if this class has the named subclass.
|
boolean |
hasSubinterface(String subinterfaceName)
Returns true if this class is an interface and has the named subinterface.
|
boolean |
hasSuperclass(String superclassName)
Returns true if this class has the named superclass.
|
boolean |
hasSuperinterface(String superinterfaceName)
Returns true if this class is an interface and has the named superinterface.
|
boolean |
implementsInterface(String interfaceName)
Returns true if this standard class implements the named interface, or by one of its superclasses.
|
boolean |
isAnnotation()
Returns true if this ClassInfo corresponds to an annotation.
|
boolean |
isDirectlyImplementedByClass(String className)
Returns true if this class is directly implemented by the named class.
|
boolean |
isImplementedByClass(String className)
Returns true if this class is implemented by the named class, or by one of its superclasses.
|
boolean |
isImplementedInterface()
Returns true if this ClassInfo corresponds to an "implemented interface" (meaning a standard, non-annotation
interface, or an annotation that has also been implemented as an interface by some class).
|
boolean |
isStandardClass()
Regular classes are not annotations or interfaces.
|
boolean |
metaAnnotatesAnnotation(String annotationName)
Returns true if this annotation has the named meta-annotation.
|
String |
toString() |
public String getClassName()
public int compareTo(ClassInfo o)
compareTo
in interface Comparable<ClassInfo>
public static List<String> getClassNames(Collection<ClassInfo> classInfoColl)
public boolean isStandardClass()
public List<String> getNamesOfSubclasses()
public boolean hasSubclass(String subclassName)
public Set<ClassInfo> getDirectSubclasses()
public List<String> getNamesOfDirectSubclasses()
public boolean hasDirectSubclass(String directSubclassName)
public List<String> getNamesOfSuperclasses()
public boolean hasSuperclass(String superclassName)
public Set<ClassInfo> getDirectSuperclasses()
public List<String> getNamesOfDirectSuperclasses()
public boolean hasDirectSuperclass(String directSuperclassName)
public boolean isImplementedInterface()
public Set<ClassInfo> getSubinterfaces()
public List<String> getNamesOfSubinterfaces()
public boolean hasSubinterface(String subinterfaceName)
public Set<ClassInfo> getDirectSubinterfaces()
public List<String> getNamesOfDirectSubinterfaces()
public boolean hasDirectSubinterface(String directSubinterfaceName)
public Set<ClassInfo> getSuperinterfaces()
public List<String> getNamesOfSuperinterfaces()
public boolean hasSuperinterface(String superinterfaceName)
public Set<ClassInfo> getDirectSuperinterfaces()
public List<String> getNamesOfDirectSuperinterfaces()
public boolean hasDirectSuperinterface(String directSuperinterfaceName)
public Set<ClassInfo> getImplementedInterfaces()
public List<String> getNamesOfImplementedInterfaces()
public boolean implementsInterface(String interfaceName)
public Set<ClassInfo> getDirectlyImplementedInterfaces()
public List<String> getNamesOfDirectlyImplementedInterfaces()
public boolean directlyImplementsInterface(String interfaceName)
public Set<ClassInfo> getClassesImplementing()
public List<String> getNamesOfClassesImplementing()
public boolean isImplementedByClass(String className)
public Set<ClassInfo> getClassesDirectlyImplementing()
public List<String> getNamesOfClassesDirectlyImplementing()
public boolean isDirectlyImplementedByClass(String className)
public boolean isAnnotation()
public Set<ClassInfo> getClassesWithAnnotation()
public List<String> getNamesOfClassesWithAnnotation()
public boolean annotatesClass(String annotatedClassName)
public Set<ClassInfo> getDirectlyAnnotatedClasses()
public List<String> getNamesOfDirectlyAnnotatedClasses()
public boolean directlyAnnotatesClass(String directlyAnnotatedClassName)
public Set<ClassInfo> getAnnotations()
public List<String> getNamesOfAnnotations()
public boolean hasAnnotation(String annotationName)
public Set<ClassInfo> getMetaAnnotations()
public List<String> getNamesOfMetaAnnotations()
public boolean hasMetaAnnotation(String metaAnnotationName)
public Set<ClassInfo> getDirectAnnotations()
public List<String> getNamesOfDirectAnnotations()
public boolean hasDirectAnnotation(String directAnnotationName)
public Set<ClassInfo> getAnnotationsWithMetaAnnotation()
public List<String> getNamesOfAnnotationsWithMetaAnnotation()
public boolean metaAnnotatesAnnotation(String annotationName)
public Set<ClassInfo> getAnnotationsWithDirectMetaAnnotation()
public List<String> getNamesOfAnnotationsWithDirectMetaAnnotation()
public boolean hasDirectMetaAnnotation(String directMetaAnnotationName)
Copyright © 2016. All rights reserved.