@NotThreadSafe public class MethodDefinition extends Object
| Constructor and Description |
|---|
MethodDefinition(EnumSet<Access> access,
String name,
ParameterizedType returnType,
List<NamedParameterDefinition> parameters) |
MethodDefinition(EnumSet<Access> access,
String name,
ParameterizedType returnType,
NamedParameterDefinition... parameters) |
public MethodDefinition(EnumSet<Access> access, String name, ParameterizedType returnType, NamedParameterDefinition... parameters)
public MethodDefinition(EnumSet<Access> access, String name, ParameterizedType returnType, List<NamedParameterDefinition> parameters)
public MethodDefinition addException(Class<? extends Throwable> exceptionClass)
public LocalVariableDefinition addLocalVariable(ParameterizedType type, String name)
public LocalVariableDefinition addInitializedLocalVariable(ParameterizedType type, String name)
public LocalVariableDefinition getLocalVariable(String name)
public MethodDefinition visitLabel(String name)
public MethodDefinition gotoLabel(String name)
public MethodDefinition ifZeroGoto(String name)
public MethodDefinition ifNullGoto(String name)
public MethodDefinition ifNotNullGoto(String name)
public MethodDefinition switchStatement(String defaultCase, CaseStatement... cases)
public MethodDefinition switchStatement(String defaultCase, List<CaseStatement> cases)
public org.objectweb.asm.tree.MethodNode getMethodNode()
public static String methodDescription(Class<?> returnType, Class<?>... parameterTypes)
public static String methodDescription(Class<?> returnType, List<Class<?>> parameterTypes)
public static String methodDescription(ParameterizedType returnType, ParameterizedType... parameterTypes)
public static String methodDescription(ParameterizedType returnType, List<ParameterizedType> parameterTypes)
public static String genericMethodSignature(ParameterizedType returnType, ParameterizedType... parameterTypes)
public static String genericMethodSignature(ParameterizedType returnType, List<ParameterizedType> parameterTypes)
public MethodDefinition loadThis()
public MethodDefinition loadObject(int slot)
public MethodDefinition loadObject(int slot, ParameterizedType type)
public MethodDefinition checkCast(ParameterizedType type)
public MethodDefinition invokeConstructor(Constructor<?> constructor)
public MethodDefinition invokeConstructor(Class<?> type, Class<?>... parameterTypes)
public MethodDefinition invokeConstructor(ParameterizedType type, ParameterizedType... parameterTypes)
public MethodDefinition invokeConstructor(ParameterizedType type, List<ParameterizedType> parameterTypes)
public MethodDefinition invokeSpecial(ParameterizedType type, String name, ParameterizedType returnType, List<ParameterizedType> parameterTypes)
public MethodDefinition invokeStatic(Method method)
public MethodDefinition invokeVirtual(Method method)
public MethodDefinition invokeVirtual(Class<?> type, String name, Class<?> returnType, Class<?>... parameterTypes)
public MethodDefinition invokeVirtual(ParameterizedType type, String name, ParameterizedType returnType, ParameterizedType... parameterTypes)
public MethodDefinition ret()
public MethodDefinition retObject()
public MethodDefinition throwException()
public MethodDefinition newObject(Class<?> type)
public MethodDefinition newObject(ParameterizedType type)
public MethodDefinition dup()
public MethodDefinition pop()
public MethodDefinition swap()
public MethodDefinition getField(Field field)
public MethodDefinition getField(Class<?> target, FieldDefinition field)
public MethodDefinition getField(ParameterizedType target, FieldDefinition field)
public MethodDefinition getField(Class<?> target, String fieldName, Class<?> fieldType)
public MethodDefinition getField(ParameterizedType target, String fieldName, ParameterizedType fieldType)
public MethodDefinition getStaticField(ParameterizedType target, FieldDefinition field)
public MethodDefinition getStaticField(ParameterizedType target, String fieldName, ParameterizedType fieldType)
public MethodDefinition putStaticField(ParameterizedType target, FieldDefinition field)
public MethodDefinition putStaticField(ParameterizedType target, String fieldName, ParameterizedType fieldType)
public MethodDefinition putField(Field field)
public MethodDefinition putField(Class<?> target, FieldDefinition field)
public MethodDefinition putField(Class<?> target, String fieldName, Class<?> fieldType)
public MethodDefinition putField(ParameterizedType target, FieldDefinition field)
public MethodDefinition putField(ParameterizedType target, String fieldName, ParameterizedType fieldType)
public MethodDefinition loadNull()
public MethodDefinition addInstruction(org.objectweb.asm.tree.AbstractInsnNode node)
public MethodDefinition loadConstant(Class<?> type)
public MethodDefinition loadConstant(ParameterizedType type)
public MethodDefinition loadConstant(String value)
public MethodDefinition loadConstant(int value)
public MethodDefinition loadVariable(String name)
public MethodDefinition loadVariable(String name, ParameterizedType type)
public MethodDefinition initializeLocalVariable(LocalVariableDefinition variable)
public MethodDefinition loadVariable(LocalVariableDefinition variable)
public MethodDefinition storeVariable(String name)
public MethodDefinition storeVariable(LocalVariableDefinition variable)
Copyright © 2012–2014 Facebook, Inc.. All rights reserved.