joeq.Runtime
Class Reflection
java.lang.Object
joeq.Runtime.Reflection
public abstract class Reflection
- extends Object
- Version:
- $Id: Reflection.java 2465 2006-06-07 23:03:17Z joewhaley $
- Author:
- John Whaley
Method Summary |
static int |
arraylength(Object o)
|
static Object |
arrayload_A(Object[] o,
int i)
|
static Address |
arrayload_R(Address[] o,
int i)
|
static Class[] |
getArgTypesFromDesc(Utf8 desc)
Utility function to extract the argument types from a method descriptor. |
static Object |
getfield_A(Object o,
jq_InstanceField f)
|
static byte |
getfield_B(Object o,
jq_InstanceField f)
|
static char |
getfield_C(Object o,
jq_InstanceField f)
|
static double |
getfield_D(Object o,
jq_InstanceField f)
|
static float |
getfield_F(Object o,
jq_InstanceField f)
|
static int |
getfield_I(Object o,
jq_InstanceField f)
|
static long |
getfield_L(Object o,
jq_InstanceField f)
|
static Address |
getfield_P(Object o,
jq_InstanceField f)
|
static short |
getfield_S(Object o,
jq_InstanceField f)
|
static boolean |
getfield_Z(Object o,
jq_InstanceField f)
|
static Object |
getfield(Object o,
jq_InstanceField f)
|
static Constructor |
getJDKConstructor(Class c,
Class[] args)
|
static Field |
getJDKField(Class c,
String name)
|
static Member |
getJDKMember(jq_Member m)
|
static Method |
getJDKMethod(Class c,
String name,
Class[] args)
|
static Class |
getJDKType(jq_Primitive c)
|
static Class |
getJDKType(jq_Reference c)
|
static Class |
getJDKType(jq_Type c)
|
static jq_Initializer |
getJQMember(Constructor f)
|
static jq_Field |
getJQMember(Field f)
|
static jq_Method |
getJQMember(Method f)
|
static jq_Type |
getJQType(Class c)
|
static Object |
getstatic_A(jq_StaticField f)
|
static byte |
getstatic_B(jq_StaticField f)
|
static char |
getstatic_C(jq_StaticField f)
|
static double |
getstatic_D(jq_StaticField f)
|
static float |
getstatic_F(jq_StaticField f)
|
static int |
getstatic_I(jq_StaticField f)
|
static long |
getstatic_L(jq_StaticField f)
|
static Address |
getstatic_P(jq_StaticField f)
|
static short |
getstatic_S(jq_StaticField f)
|
static boolean |
getstatic_Z(jq_StaticField f)
|
static jq_Reference |
getTypeOf(Object o)
|
static long |
invoke(jq_Method m,
Object dis,
Object[] args)
|
static Address |
invokeA(jq_Method m,
Object dis,
Object[] args)
|
static Object |
invokeinstance_A(jq_InstanceMethod m,
Object dis)
|
static Object |
invokeinstance_A(jq_InstanceMethod m,
Object dis,
Object arg1)
|
static void |
invokeinstance_V(jq_InstanceMethod m,
Object dis)
|
static void |
invokeinstance_V(jq_InstanceMethod m,
Object dis,
Object arg1)
|
static void |
invokeinstance_V(jq_InstanceMethod m,
Object dis,
Object arg1,
int arg2,
long arg3,
int arg4)
|
static void |
invokeinstance_V(jq_InstanceMethod m,
Object dis,
Object arg1,
Object arg2)
|
static void |
invokeinstance_V(jq_InstanceMethod m,
Object dis,
Object arg1,
Object arg2,
Object arg3)
|
static void |
invokeinstance_V(jq_InstanceMethod m,
Object dis,
Object arg1,
Object arg2,
Object arg3,
long arg4)
|
static boolean |
invokeinstance_Z(jq_InstanceMethod m,
Object dis,
Object arg1)
|
static Object |
invokestatic_A(jq_StaticMethod m)
|
static int |
invokestatic_I(jq_StaticMethod m)
|
static long |
invokestatic_J(jq_StaticMethod m)
|
static void |
invokestatic_V(jq_StaticMethod m)
|
static void |
invokestatic_V(jq_StaticMethod m,
Object arg1)
|
static void |
putfield_A(Object o,
jq_InstanceField f,
Object v)
|
static void |
putfield_B(Object o,
jq_InstanceField f,
byte v)
|
static void |
putfield_C(Object o,
jq_InstanceField f,
char v)
|
static void |
putfield_D(Object o,
jq_InstanceField f,
double v)
|
static void |
putfield_F(Object o,
jq_InstanceField f,
float v)
|
static void |
putfield_I(Object o,
jq_InstanceField f,
int v)
|
static void |
putfield_L(Object o,
jq_InstanceField f,
long v)
|
static void |
putfield_P(Object o,
jq_InstanceField f,
Address v)
|
static void |
putfield_S(Object o,
jq_InstanceField f,
short v)
|
static void |
putfield_Z(Object o,
jq_InstanceField f,
boolean v)
|
static void |
putstatic_A(jq_StaticField f,
Object v)
|
static void |
putstatic_B(jq_StaticField f,
byte v)
|
static void |
putstatic_C(jq_StaticField f,
char v)
|
static void |
putstatic_D(jq_StaticField f,
double v)
|
static void |
putstatic_F(jq_StaticField f,
float v)
|
static void |
putstatic_I(jq_StaticField f,
int v)
|
static void |
putstatic_L(jq_StaticField f,
long v)
|
static void |
putstatic_P(jq_StaticField f,
Address v)
|
static void |
putstatic_S(jq_StaticField f,
short v)
|
static void |
putstatic_Z(jq_StaticField f,
boolean v)
|
static void |
registerNullStaticFields(Set s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
obj_trav
public static ObjectTraverser obj_trav
USE_DECLARED_FIELDS_CACHE
public static boolean USE_DECLARED_FIELDS_CACHE
_class
public static jq_Class _class
_obj_trav
public static jq_StaticField _obj_trav
Reflection
public Reflection()
getTypeOf
public static final jq_Reference getTypeOf(Object o)
getJQType
public static final jq_Type getJQType(Class c)
getJDKType
public static final Class getJDKType(jq_Type c)
getJDKType
public static final Class getJDKType(jq_Primitive c)
getJDKType
public static Class getJDKType(jq_Reference c)
getJQMember
public static final jq_Field getJQMember(Field f)
getJQMember
public static final jq_Method getJQMember(Method f)
getJQMember
public static final jq_Initializer getJQMember(Constructor f)
getJDKField
public static final Field getJDKField(Class c,
String name)
getJDKMethod
public static final Method getJDKMethod(Class c,
String name,
Class[] args)
getJDKConstructor
public static final Constructor getJDKConstructor(Class c,
Class[] args)
getJDKMember
public static final Member getJDKMember(jq_Member m)
getArgTypesFromDesc
public static Class[] getArgTypesFromDesc(Utf8 desc)
- Utility function to extract the argument types from a method descriptor.
- Parameters:
desc
-
- Returns:
- array of argument types
invokestatic_V
public static void invokestatic_V(jq_StaticMethod m)
throws Throwable
- Throws:
Throwable
invokestatic_I
public static int invokestatic_I(jq_StaticMethod m)
throws Throwable
- Throws:
Throwable
invokestatic_A
public static Object invokestatic_A(jq_StaticMethod m)
throws Throwable
- Throws:
Throwable
invokestatic_J
public static long invokestatic_J(jq_StaticMethod m)
throws Throwable
- Throws:
Throwable
invokestatic_V
public static void invokestatic_V(jq_StaticMethod m,
Object arg1)
throws Throwable
- Throws:
Throwable
invokeinstance_V
public static void invokeinstance_V(jq_InstanceMethod m,
Object dis)
throws Throwable
- Throws:
Throwable
invokeinstance_A
public static Object invokeinstance_A(jq_InstanceMethod m,
Object dis)
throws Throwable
- Throws:
Throwable
invokeinstance_V
public static void invokeinstance_V(jq_InstanceMethod m,
Object dis,
Object arg1)
throws Throwable
- Throws:
Throwable
invokeinstance_A
public static Object invokeinstance_A(jq_InstanceMethod m,
Object dis,
Object arg1)
throws Throwable
- Throws:
Throwable
invokeinstance_Z
public static boolean invokeinstance_Z(jq_InstanceMethod m,
Object dis,
Object arg1)
throws Throwable
- Throws:
Throwable
invokeinstance_V
public static void invokeinstance_V(jq_InstanceMethod m,
Object dis,
Object arg1,
Object arg2)
throws Throwable
- Throws:
Throwable
invokeinstance_V
public static void invokeinstance_V(jq_InstanceMethod m,
Object dis,
Object arg1,
Object arg2,
Object arg3)
throws Throwable
- Throws:
Throwable
invokeinstance_V
public static void invokeinstance_V(jq_InstanceMethod m,
Object dis,
Object arg1,
Object arg2,
Object arg3,
long arg4)
throws Throwable
- Throws:
Throwable
invokeinstance_V
public static void invokeinstance_V(jq_InstanceMethod m,
Object dis,
Object arg1,
int arg2,
long arg3,
int arg4)
throws Throwable
- Throws:
Throwable
invoke
public static long invoke(jq_Method m,
Object dis,
Object[] args)
throws IllegalArgumentException,
InvocationTargetException
- Throws:
IllegalArgumentException
InvocationTargetException
invokeA
public static Address invokeA(jq_Method m,
Object dis,
Object[] args)
throws IllegalArgumentException,
InvocationTargetException
- Throws:
IllegalArgumentException
InvocationTargetException
getfield_I
public static int getfield_I(Object o,
jq_InstanceField f)
getfield_L
public static long getfield_L(Object o,
jq_InstanceField f)
getfield_F
public static float getfield_F(Object o,
jq_InstanceField f)
getfield_D
public static double getfield_D(Object o,
jq_InstanceField f)
getfield_A
public static Object getfield_A(Object o,
jq_InstanceField f)
getfield_P
public static Address getfield_P(Object o,
jq_InstanceField f)
getfield_B
public static byte getfield_B(Object o,
jq_InstanceField f)
getfield_C
public static char getfield_C(Object o,
jq_InstanceField f)
getfield_S
public static short getfield_S(Object o,
jq_InstanceField f)
getfield_Z
public static boolean getfield_Z(Object o,
jq_InstanceField f)
getfield
public static Object getfield(Object o,
jq_InstanceField f)
putfield_I
public static void putfield_I(Object o,
jq_InstanceField f,
int v)
putfield_L
public static void putfield_L(Object o,
jq_InstanceField f,
long v)
putfield_F
public static void putfield_F(Object o,
jq_InstanceField f,
float v)
putfield_D
public static void putfield_D(Object o,
jq_InstanceField f,
double v)
putfield_A
public static void putfield_A(Object o,
jq_InstanceField f,
Object v)
putfield_P
public static void putfield_P(Object o,
jq_InstanceField f,
Address v)
putfield_B
public static void putfield_B(Object o,
jq_InstanceField f,
byte v)
putfield_C
public static void putfield_C(Object o,
jq_InstanceField f,
char v)
putfield_S
public static void putfield_S(Object o,
jq_InstanceField f,
short v)
putfield_Z
public static void putfield_Z(Object o,
jq_InstanceField f,
boolean v)
getstatic_I
public static int getstatic_I(jq_StaticField f)
getstatic_L
public static long getstatic_L(jq_StaticField f)
getstatic_F
public static float getstatic_F(jq_StaticField f)
getstatic_D
public static double getstatic_D(jq_StaticField f)
getstatic_A
public static Object getstatic_A(jq_StaticField f)
getstatic_P
public static Address getstatic_P(jq_StaticField f)
getstatic_Z
public static boolean getstatic_Z(jq_StaticField f)
getstatic_B
public static byte getstatic_B(jq_StaticField f)
getstatic_S
public static short getstatic_S(jq_StaticField f)
getstatic_C
public static char getstatic_C(jq_StaticField f)
putstatic_I
public static void putstatic_I(jq_StaticField f,
int v)
putstatic_L
public static void putstatic_L(jq_StaticField f,
long v)
putstatic_F
public static void putstatic_F(jq_StaticField f,
float v)
putstatic_D
public static void putstatic_D(jq_StaticField f,
double v)
putstatic_A
public static void putstatic_A(jq_StaticField f,
Object v)
putstatic_P
public static void putstatic_P(jq_StaticField f,
Address v)
putstatic_Z
public static void putstatic_Z(jq_StaticField f,
boolean v)
putstatic_B
public static void putstatic_B(jq_StaticField f,
byte v)
putstatic_S
public static void putstatic_S(jq_StaticField f,
short v)
putstatic_C
public static void putstatic_C(jq_StaticField f,
char v)
arraylength
public static int arraylength(Object o)
arrayload_A
public static Object arrayload_A(Object[] o,
int i)
arrayload_R
public static Address arrayload_R(Address[] o,
int i)
registerNullStaticFields
public static void registerNullStaticFields(Set s)
Copyright © 2001-2008 John Whaley. All Rights Reserved.