|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--koala.dynamicjava.classinfo.ClassInfoUtilities
This class contains a collection of utility methods for reflection.
| Method Summary | |
static FieldInfo |
getField(ClassInfo cl,
java.lang.String name)
Returns a field with the given name declared in the given class or in the superclasses of the given class |
static java.util.List |
getMethods(ClassInfo cl,
java.lang.String name,
int params)
Gets all the methods with the given name in the given class or super classes. |
static FieldInfo |
getOuterField(ClassInfo cl,
java.lang.String name)
Returns a field with the given name declared in one of the outer classes of the given class |
static boolean |
isAssignableFrom(ClassInfo c1,
ClassInfo c2)
Tests whether c1 is assignable from c2. |
static ConstructorInfo |
lookupConstructor(ClassInfo cl,
ClassInfo[] ac)
Looks for a constructor in the given class or in super classes of this class. |
static MethodInfo |
lookupMethod(ClassInfo cl,
java.lang.String name,
ClassInfo[] ac)
Looks for a method in the given class or in super classes of this class. |
static MethodInfo |
lookupOuterMethod(ClassInfo cl,
java.lang.String name,
ClassInfo[] ac)
Looks up for a method in an outer classes of this class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static ConstructorInfo lookupConstructor(ClassInfo cl,
ClassInfo[] ac)
throws java.lang.NoSuchMethodException
cl - the class of which the constructor is a memberac - the arguments classes (possibly not the exact declaring classes)
public static boolean isAssignableFrom(ClassInfo c1,
ClassInfo c2)
c1 - a class infoc2 - a class info
public static FieldInfo getField(ClassInfo cl,
java.lang.String name)
throws java.lang.NoSuchFieldException,
AmbiguousFieldException
cl - the class where the field must look for the fieldname - the name of the field
public static FieldInfo getOuterField(ClassInfo cl,
java.lang.String name)
throws java.lang.NoSuchFieldException,
AmbiguousFieldException
cl - the inner classname - the name of the field
public static MethodInfo lookupMethod(ClassInfo cl,
java.lang.String name,
ClassInfo[] ac)
throws java.lang.NoSuchMethodException
cl - the class of which the method is a membername - the name of the methodac - the arguments classes (possibly not the exact declaring classes)
public static MethodInfo lookupOuterMethod(ClassInfo cl,
java.lang.String name,
ClassInfo[] ac)
throws java.lang.NoSuchMethodException
cl - the inner classname - the name of the methodac - the arguments classes (possibly not the exact declaring classes)
public static java.util.List getMethods(ClassInfo cl,
java.lang.String name,
int params)
cl - the class where the method was declaredname - the name of the methodparams - the number of parameters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||