Package io.airlift.bytecode
Class MethodDefinition
java.lang.Object
io.airlift.bytecode.MethodDefinition
-
Constructor Summary
ConstructorsConstructorDescriptionMethodDefinition(ClassDefinition declaringClass, EnumSet<Access> access, String name, ParameterizedType returnType, Parameter... parameters) MethodDefinition(ClassDefinition declaringClass, EnumSet<Access> access, String name, ParameterizedType returnType, Iterable<Parameter> parameters) -
Method Summary
Modifier and TypeMethodDescriptionaddException(Class<? extends Throwable> exceptionClass) declareAnnotation(Class<?> type) declareParameterAnnotation(ParameterizedType type, int parameterIndex) declareParameterAnnotation(Class<?> type, int parameterIndex) static StringgenericMethodSignature(ParameterizedType returnType, ParameterizedType... parameterTypes) static StringgenericMethodSignature(ParameterizedType returnType, List<ParameterizedType> parameterTypes) getBody()getName()getParameterAnnotations(int index) getScope()getThis()static StringmethodDescription(ParameterizedType returnType, ParameterizedType... parameterTypes) static StringmethodDescription(ParameterizedType returnType, List<ParameterizedType> parameterTypes) static StringmethodDescription(Class<?> returnType, Class<?>... parameterTypes) static StringmethodDescription(Class<?> returnType, List<Class<?>> parameterTypes) toString()voidvisit(org.objectweb.asm.ClassVisitor visitor) voidvisit(org.objectweb.asm.ClassVisitor visitor, boolean addReturn)
-
Constructor Details
-
MethodDefinition
public MethodDefinition(ClassDefinition declaringClass, EnumSet<Access> access, String name, ParameterizedType returnType, Parameter... parameters) -
MethodDefinition
public MethodDefinition(ClassDefinition declaringClass, EnumSet<Access> access, String name, ParameterizedType returnType, Iterable<Parameter> parameters)
-
-
Method Details
-
getDeclaringClass
-
getAnnotations
-
getParameterAnnotations
-
getAccess
-
getName
-
getReturnType
-
getParameters
-
getParameterTypes
-
getExceptions
-
addException
-
comment
-
getComment
-
getScope
-
getThis
-
getMethodDescriptor
-
getBody
-
declareAnnotation
-
declareAnnotation
-
declareParameterAnnotation
-
declareParameterAnnotation
-
visit
public void visit(org.objectweb.asm.ClassVisitor visitor) -
visit
public void visit(org.objectweb.asm.ClassVisitor visitor, boolean addReturn) -
toSourceString
-
toString
-
methodDescription
-
methodDescription
-
methodDescription
public static String methodDescription(ParameterizedType returnType, ParameterizedType... parameterTypes) -
methodDescription
public static String methodDescription(ParameterizedType returnType, List<ParameterizedType> parameterTypes) -
genericMethodSignature
public static String genericMethodSignature(ParameterizedType returnType, ParameterizedType... parameterTypes) -
genericMethodSignature
public static String genericMethodSignature(ParameterizedType returnType, List<ParameterizedType> parameterTypes)
-