public class ArtMethod
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
ArtMethod |
backup() |
boolean |
compile()
Force compile the method to avoid interpreter mode.
|
void |
ensureResolved()
the static method is lazy resolved, when not resolved, the entry point is a trampoline of
a bridge, we can not hook these entry. this method force the static method to be resolved.
|
int |
getAccessFlags() |
long |
getAddress()
get the memory address of the inner constructor/method
|
static int |
getArtMethodSize()
The size of an art::mirror::ArtMethod, we use two rule method to measure the size
|
long |
getEntryPointFromJni() |
long |
getEntryPointFromQuickCompiledCode()
The entry point of the quick compiled code.
|
java.lang.Object |
getExecutable() |
long |
getFieldOffset() |
java.lang.String |
getIdentifier()
get the unique identifier of the constructor/method
|
int |
getModifiers()
get the modifiers of origin method/constructor
|
java.lang.String |
getName()
get the origin method's name
|
java.lang.Class<?>[] |
getParameterTypes()
get the parameter type of origin method/constructor
|
static long |
getQuickToInterpreterBridge() |
java.lang.Class<?> |
getReturnType()
get the return type of origin method/constructor
|
java.lang.Object |
invoke(java.lang.Object receiver,
java.lang.Object... args)
invoke the origin method
|
void |
makePrivate()
force set the private flag of the method.
|
static ArtMethod |
of(java.lang.reflect.Constructor constructor) |
static ArtMethod |
of(java.lang.reflect.Method method) |
static long |
searchOffset(long base,
long range,
int value)
search Offset in memory
|
static long |
searchOffset(long base,
long range,
long value) |
void |
setAccessFlags(int newFlags) |
void |
setAccessible(boolean accessible)
make the constructor or method accessible
|
void |
setEntryPointFromJni(long entryPointFromJni) |
void |
setEntryPointFromQuickCompiledCode(long pointer_entry_point_from_quick_compiled_code) |
public static ArtMethod of(java.lang.reflect.Method method)
public static ArtMethod of(java.lang.reflect.Constructor constructor)
public ArtMethod backup()
public void setAccessible(boolean accessible)
accessible - accessiblepublic java.lang.String getName()
public boolean compile()
public java.lang.Object invoke(java.lang.Object receiver,
java.lang.Object... args)
throws java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.InstantiationException
receiver - the receiverargs - origin method/constructor's parametersjava.lang.IllegalAccessException - throw if no access, impossible.java.lang.reflect.InvocationTargetException - invoke target error.java.lang.InstantiationException - throw when the constructor can not create instance.public int getModifiers()
public java.lang.Class<?>[] getParameterTypes()
public java.lang.Class<?> getReturnType()
public java.lang.Object getExecutable()
public long getAddress()
public java.lang.String getIdentifier()
public void makePrivate()
public void ensureResolved()
public long getEntryPointFromQuickCompiledCode()
public void setEntryPointFromQuickCompiledCode(long pointer_entry_point_from_quick_compiled_code)
pointer_entry_point_from_quick_compiled_code - the entry point.public int getAccessFlags()
public void setAccessFlags(int newFlags)
public void setEntryPointFromJni(long entryPointFromJni)
public long getEntryPointFromJni()
public static int getArtMethodSize()
public static long getQuickToInterpreterBridge()
public long getFieldOffset()
public static long searchOffset(long base,
long range,
int value)
base - base addressrange - search rangevalue - search valuepublic static long searchOffset(long base,
long range,
long value)