public class ProxettaAsmUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLINIT |
static java.lang.String |
DESC_VOID |
static java.lang.String |
INIT |
Constructor and Description |
---|
ProxettaAsmUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
adviceFieldName(java.lang.String name,
int index)
Builds advice field name.
|
static java.lang.String |
adviceMethodName(java.lang.String name,
int index)
Builds advice method name.
|
static void |
castToReturnType(MethodVisitor mv,
MethodInfo methodInfo) |
static void |
checkArgumentIndex(MethodInfo methodInfo,
int argIndex)
Validates argument index.
|
static java.lang.String |
createMethodSignaturesKey(int access,
java.lang.String methodName,
java.lang.String description,
java.lang.String className)
Creates unique key for method signatures map.
|
static boolean |
isArgumentMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isArgumentsCountMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isArgumentTypeMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isCreateArgumentsArrayMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isCreateArgumentsClassArrayMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isInfoMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isInvokeMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isReturnTypeMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isReturnValueMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isSetArgumentMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isStoreOpcode(int opcode)
Returns
true if opcode is xSTORE. |
static boolean |
isTargetClassAnnotationMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isTargetClassMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isTargetMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isTargetMethodAnnotationMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isTargetMethodDescriptionMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isTargetMethodNameMethod(java.lang.String name,
java.lang.String desc) |
static boolean |
isTargetMethodSignatureMethod(java.lang.String name,
java.lang.String desc) |
static void |
loadClass(MethodVisitor mv,
int type,
java.lang.String typeName) |
static void |
loadMethodArgument(MethodVisitor mv,
MethodInfo methodInfo,
int index)
Loads one argument.
|
static void |
loadMethodArgumentAsObject(MethodVisitor mv,
MethodInfo methodInfo,
int index) |
static void |
loadMethodArgumentClass(MethodVisitor mv,
MethodInfo methodInfo,
int index) |
static void |
loadSpecialMethodArguments(MethodVisitor mv,
MethodInfo methodInfo)
Loads all method arguments before INVOKESPECIAL call.
|
static void |
loadStaticMethodArguments(MethodVisitor mv,
MethodInfo methodInfo)
Loads all method arguments before INVOKESTATIC call.
|
static void |
loadVirtualMethodArguments(MethodVisitor mv,
MethodInfo methodInfo)
Loads all method arguments before INVOKEVIRTUAL call.
|
static int |
makePrivateFinalAccess(int access)
Changes method access to private and final.
|
static void |
newArray(MethodVisitor mv,
java.lang.Class componentType)
Creates new array.
|
static void |
prepareReturnValue(MethodVisitor mv,
MethodInfo methodInfo,
int varOffset)
Prepares return value.
|
static void |
pushInt(MethodVisitor mv,
int value)
Pushes int value in an optimal way.
|
static int |
resolveJavaVersion(int version)
Resolves Java version from current version.
|
static void |
storeIntoArray(MethodVisitor mv,
java.lang.Class componentType)
Stores element on stack into an array.
|
static void |
storeMethodArgument(MethodVisitor mv,
MethodInfo methodInfo,
int index)
Stores one argument.
|
static void |
storeMethodArgumentFromObject(MethodVisitor mv,
MethodInfo methodInfo,
int index) |
static void |
storeValue(MethodVisitor mv,
int offset,
int type) |
static void |
visitElementValue(MethodVisitor mv,
java.lang.Object elementValue,
boolean boxPrimitives)
Visits non-array element value for annotation.
|
static void |
visitReturn(MethodVisitor mv,
MethodInfo methodInfo,
boolean isLast)
Visits return opcodes.
|
public static final java.lang.String INIT
public static final java.lang.String CLINIT
public static final java.lang.String DESC_VOID
public static int resolveJavaVersion(int version)
public static void pushInt(MethodVisitor mv, int value)
public static int makePrivateFinalAccess(int access)
public static void checkArgumentIndex(MethodInfo methodInfo, int argIndex)
public static java.lang.String adviceFieldName(java.lang.String name, int index)
public static java.lang.String adviceMethodName(java.lang.String name, int index)
public static void loadMethodArgumentClass(MethodVisitor mv, MethodInfo methodInfo, int index)
public static void loadClass(MethodVisitor mv, int type, java.lang.String typeName)
public static void loadSpecialMethodArguments(MethodVisitor mv, MethodInfo methodInfo)
public static void loadStaticMethodArguments(MethodVisitor mv, MethodInfo methodInfo)
public static void loadVirtualMethodArguments(MethodVisitor mv, MethodInfo methodInfo)
public static void loadMethodArgument(MethodVisitor mv, MethodInfo methodInfo, int index)
public static void loadMethodArgumentAsObject(MethodVisitor mv, MethodInfo methodInfo, int index)
public static void storeMethodArgument(MethodVisitor mv, MethodInfo methodInfo, int index)
public static boolean isStoreOpcode(int opcode)
true
if opcode is xSTORE.public static void storeMethodArgumentFromObject(MethodVisitor mv, MethodInfo methodInfo, int index)
public static void storeValue(MethodVisitor mv, int offset, int type)
public static void visitReturn(MethodVisitor mv, MethodInfo methodInfo, boolean isLast)
public static void prepareReturnValue(MethodVisitor mv, MethodInfo methodInfo, int varOffset)
public static void castToReturnType(MethodVisitor mv, MethodInfo methodInfo)
public static java.lang.String createMethodSignaturesKey(int access, java.lang.String methodName, java.lang.String description, java.lang.String className)
public static void visitElementValue(MethodVisitor mv, java.lang.Object elementValue, boolean boxPrimitives)
true
if value is successfully processed.public static void newArray(MethodVisitor mv, java.lang.Class componentType)
public static void storeIntoArray(MethodVisitor mv, java.lang.Class componentType)
public static boolean isInvokeMethod(java.lang.String name, java.lang.String desc)
public static boolean isArgumentsCountMethod(java.lang.String name, java.lang.String desc)
public static boolean isArgumentTypeMethod(java.lang.String name, java.lang.String desc)
public static boolean isArgumentMethod(java.lang.String name, java.lang.String desc)
public static boolean isSetArgumentMethod(java.lang.String name, java.lang.String desc)
public static boolean isCreateArgumentsArrayMethod(java.lang.String name, java.lang.String desc)
public static boolean isCreateArgumentsClassArrayMethod(java.lang.String name, java.lang.String desc)
public static boolean isReturnTypeMethod(java.lang.String name, java.lang.String desc)
public static boolean isTargetMethod(java.lang.String name, java.lang.String desc)
public static boolean isTargetClassMethod(java.lang.String name, java.lang.String desc)
public static boolean isTargetMethodNameMethod(java.lang.String name, java.lang.String desc)
public static boolean isTargetMethodSignatureMethod(java.lang.String name, java.lang.String desc)
public static boolean isTargetMethodDescriptionMethod(java.lang.String name, java.lang.String desc)
public static boolean isReturnValueMethod(java.lang.String name, java.lang.String desc)
public static boolean isInfoMethod(java.lang.String name, java.lang.String desc)
public static boolean isTargetMethodAnnotationMethod(java.lang.String name, java.lang.String desc)
public static boolean isTargetClassAnnotationMethod(java.lang.String name, java.lang.String desc)
Copyright © 2003-present Jodd Team