|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.aspectwerkz.reflect.ClassInfoHelper
public class ClassInfoHelper
Utility method for manipulating and managing ClassInfo hierarchies.
Constructor Summary | |
---|---|
ClassInfoHelper()
|
Method Summary | |
---|---|
static List |
collectInterfaces(ClassInfo classInfo)
Collects all the interface from the given class including the one from its super class. |
static List |
collectMethodsFromInterface(ClassInfo interfaceClassInfo)
Collects the methods from all the interface and its super interfaces. |
static List |
collectMethodsFromInterfacesImplementedBy(ClassInfo classInfo)
Collects the methods from all the interfaces of the class and its super interfaces. |
static List |
createInterfaceDefinedMethodList(ClassInfo klass,
List interfaceDeclaredMethods)
Creates a method list of all the methods in the class and super classes, if and only if those are part of the given list of interfaces declared methods. |
static List |
createMethodList(ClassInfo klass)
Creates a method list of all the methods in the class and super classes, including package private ones. |
static boolean |
extendsSuperClass(ClassInfo classInfo,
String className)
Checks if a class has a certain class as super class, somewhere up in the class hierarchy. |
static boolean |
hasMethodClash(Set interfacesToAdd,
ClassLoader loader)
Checks if a set of interfaces has any clashes, meaning any methods with the same name and signature. |
static boolean |
implementsInterface(ClassInfo classInfo,
String interfaceName)
Checks if a class implements a certain inteface, somewhere up in the class hierarchy, excluding itself. |
static boolean |
instanceOf(ClassInfo classInfo,
String superclassName)
Checks if a class has a certain class as super class or interface, somewhere up in the class hierarchy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassInfoHelper()
Method Detail |
---|
public static boolean instanceOf(ClassInfo classInfo, String superclassName)
classInfo
- the meta-data for the class to parsesuperclassName
- the name of the super class or interface
public static boolean implementsInterface(ClassInfo classInfo, String interfaceName)
classInfo
- interfaceName
-
public static boolean extendsSuperClass(ClassInfo classInfo, String className)
classInfo
- the meta-data for the class to parseclassName
- the name of the super class
public static List createMethodList(ClassInfo klass)
klass
- the class with the methods
public static List collectMethodsFromInterface(ClassInfo interfaceClassInfo)
interfaceClassInfo
-
public static List collectMethodsFromInterfacesImplementedBy(ClassInfo classInfo)
classInfo
-
public static List createInterfaceDefinedMethodList(ClassInfo klass, List interfaceDeclaredMethods)
klass
- the class with the methodsinterfaceDeclaredMethods
- the list of interface declared methods
public static List collectInterfaces(ClassInfo classInfo)
classInfo
-
public static boolean hasMethodClash(Set interfacesToAdd, ClassLoader loader)
interfacesToAdd
- loader
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |