Package com.strobel.reflection.emit
Class MethodBuilder
java.lang.Object
com.strobel.reflection.MemberInfo
com.strobel.reflection.MethodBase
com.strobel.reflection.MethodInfo
com.strobel.reflection.emit.MethodBuilder
- All Implemented Interfaces:
AnnotatedElement
- Author:
- Mike Strobel
-
Field Summary
Fields inherited from class com.strobel.reflection.MethodInfo
_erasedMethodDefinition -
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
voidaddCustomAnnotation(AnnotationBuilder<A> annotation) voidcreateMethodBody(byte[] bytecode, int size) defineGenericParameters(String... names) defineParameter(int position, String name) <T extends Annotation>
TgetAnnotation(Class<T> annotationClass) getCodeGenerator(int initialSize) ReadOnlyList<AnnotationBuilder<? extends Annotation>> TypeBuilder<?> intgetName()Type<?> Type<?> booleanisAnnotationPresent(Class<? extends Annotation> annotationClass) booleanbooleanbooleanbooleanvoidsetDefaultValue(Object value) voidsetParameters(TypeList types) voidsetReturnType(Type<?> type) voidsetSignature(Type<?> returnType, TypeList parameterTypes) voidsetThrownTypes(TypeList types) Methods inherited from class com.strobel.reflection.MethodInfo
appendBriefDescription, appendErasedDescription, appendModifiers, containsGenericParameter, containsGenericParameters, emptyMethods, findBaseMethod, findOverriddenMethod, getGenericMethodDefinition, getMemberType, getTypeArguments, getTypeBindings, invoke, isAbstract, isDefault, isEquivalentTo, makeGenericMethod, makeGenericMethodMethods inherited from class com.strobel.reflection.MethodBase
getCallingConventionMethods inherited from class com.strobel.reflection.MemberInfo
appendGenericSignature, emptyAnnotations, equals, getAnnotationsByType, getBriefDescription, getDeclaredAnnotation, getDeclaredAnnotationsByType, getDescription, getErasedDescription, getErasedSignature, getSignature, getSimpleDescription, hashCode, invalidateCaches, isFinal, isNonPublic, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, toString
-
Method Details
-
getCodeGenerator
-
getCodeGenerator
-
getName
- Overrides:
getNamein classMethodInfo
-
getReturnType
- Specified by:
getReturnTypein classMethodInfo
-
getSignatureType
- Specified by:
getSignatureTypein classMethodBase
-
getRawMethod
- Specified by:
getRawMethodin classMethodInfo
-
getDefaultValue
- Overrides:
getDefaultValuein classMethodInfo
-
setDefaultValue
-
getDeclaringType
- Specified by:
getDeclaringTypein classMemberInfo
-
getModifiers
public int getModifiers()- Specified by:
getModifiersin classMemberInfo
-
getParameters
- Overrides:
getParametersin classMethodBase
-
getThrownTypes
- Overrides:
getThrownTypesin classMethodBase
-
getParameterTypes
-
getDefinedParameters
-
isTypeCreated
public boolean isTypeCreated() -
isFinished
public boolean isFinished() -
setReturnType
-
setSignature
-
setParameters
-
setThrownTypes
-
getReflectedType
- Overrides:
getReflectedTypein classMemberInfo
-
addCustomAnnotation
-
getCustomAnnotations
-
getAnnotation
- Specified by:
getAnnotationin interfaceAnnotatedElement- Overrides:
getAnnotationin classMethodInfo
-
getAnnotations
- Specified by:
getAnnotationsin interfaceAnnotatedElement- Overrides:
getAnnotationsin classMethodInfo
-
getDeclaredAnnotations
- Specified by:
getDeclaredAnnotationsin interfaceAnnotatedElement- Overrides:
getDeclaredAnnotationsin classMethodInfo
-
isAnnotationPresent
- Specified by:
isAnnotationPresentin interfaceAnnotatedElement- Overrides:
isAnnotationPresentin classMethodInfo
-
isGenericMethod
public boolean isGenericMethod()- Overrides:
isGenericMethodin classMethodInfo
-
isGenericMethodDefinition
public boolean isGenericMethodDefinition()- Overrides:
isGenericMethodDefinitionin classMethodInfo
-
getGenericMethodParameters
- Overrides:
getGenericMethodParametersin classMethodInfo
-
getErasedMethodDefinition
- Overrides:
getErasedMethodDefinitionin classMethodInfo
-
appendDescription
- Overrides:
appendDescriptionin classMethodInfo
-
appendSimpleDescription
- Overrides:
appendSimpleDescriptionin classMethodInfo
-
appendErasedSignature
- Overrides:
appendErasedSignaturein classMethodInfo
-
appendSignature
- Overrides:
appendSignaturein classMethodInfo
-
defineGenericParameters
-
defineParameter
-
createMethodBody
public void createMethodBody(byte[] bytecode, int size)
-