|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.classfile.Reflection
public class Reflection
Class Reflection provides static convenience methods for using Java Reflection in conjunction with the RIT Classfile Library.
| Method Summary | |
|---|---|
static ClassReference |
getClassReference(Class theClass)
Returns a class reference for the given class. |
static MethodReference |
getMethodReference(ClassReference theClass,
Method theMethod)
Returns a method reference for the given method. |
static TypeReference |
getTypeReference(Class theClass)
Returns a type reference for the given class. |
static SynthesizedMethodDescription |
synthesizeMethod(SynthesizedClassDescription theClass,
Method theMethod)
Returns a synthesized method description for the given method in the given synthesized class description. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static TypeReference getTypeReference(Class theClass)
theClass - Class; it may denote a non-primitive type (class,
interface, or array), a primitive type, or
void.
NullPointerException - (unchecked exception) Thrown if theClass is null.public static ClassReference getClassReference(Class theClass)
theClass - Class; it may only denote a class or interface.
NullPointerException - (unchecked exception) Thrown if theClass is null.
IllegalArgumentException - (unchecked exception) Thrown if theClass denotes an array,
a primitive type, or void.
public static MethodReference getMethodReference(ClassReference theClass,
Method theMethod)
throws ListFullException
theClass - Class reference for the method's class or interface.theMethod - Information about the method, obtained by reflection.
NullPointerException - (unchecked exception) Thrown if theClass is null or
theMethod is null.
ListFullException - Thrown if theMethod has more than 254 arguments.
public static SynthesizedMethodDescription synthesizeMethod(SynthesizedClassDescription theClass,
Method theMethod)
throws ListFullException
theClass - Synthesized class description to which to add the
method.theMethod - Information about the method to add, obtained by
reflection.
NullPointerException - (unchecked exception) Thrown if theClass is null or
theMethod is null.
ListFullException - Thrown if theClass's subroutine list is full (i.e., contains
65535 subroutines).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||