public final class MethodBuilder extends MethodInfo
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomAnnotation(AnnotationBuilder annotation) |
java.lang.StringBuilder |
appendDescription(java.lang.StringBuilder sb) |
java.lang.StringBuilder |
appendErasedSignature(java.lang.StringBuilder sb) |
java.lang.StringBuilder |
appendSignature(java.lang.StringBuilder sb) |
java.lang.StringBuilder |
appendSimpleDescription(java.lang.StringBuilder sb) |
void |
createMethodBody(byte[] bytecode,
int size) |
GenericParameterBuilderList |
defineGenericParameters(java.lang.String... names) |
ParameterBuilder |
defineParameter(int position,
java.lang.String name) |
<T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> annotationClass) |
java.lang.annotation.Annotation[] |
getAnnotations() |
CodeGenerator |
getCodeGenerator() |
CodeGenerator |
getCodeGenerator(int initialSize) |
com.strobel.core.ReadOnlyList<AnnotationBuilder<? extends java.lang.annotation.Annotation>> |
getCustomAnnotations() |
java.lang.annotation.Annotation[] |
getDeclaredAnnotations() |
TypeBuilder<?> |
getDeclaringType() |
java.lang.Object |
getDefaultValue() |
int |
getModifiers() |
java.lang.String |
getName() |
ParameterList |
getParameters() |
TypeList |
getParameterTypes() |
java.lang.reflect.Method |
getRawMethod() |
Type |
getReflectedType() |
Type<?> |
getReturnType() |
SignatureType |
getSignatureType() |
TypeList |
getThrownTypes() |
boolean |
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) |
boolean |
isFinished() |
boolean |
isGenericMethod() |
boolean |
isGenericMethodDefinition() |
boolean |
isTypeCreated() |
void |
setDefaultValue(java.lang.Object value) |
void |
setParameters(TypeList types) |
void |
setReturnType(Type<?> type) |
void |
setSignature(Type<?> returnType,
TypeList parameterTypes) |
void |
setThrownTypes(TypeList types) |
appendBriefDescription, appendErasedDescription, containsGenericParameters, findBaseMethod, findOverriddenMethod, getErasedMethodDefinition, getGenericMethodDefinition, getGenericMethodParameters, getMemberType, getTypeArguments, getTypeBindings, invoke, isAbstract, isDefault, makeGenericMethod, makeGenericMethodgetCallingConventiongetAnnotationsByType, getBriefDescription, getDeclaredAnnotation, getDeclaredAnnotationsByType, getDescription, getErasedDescription, getErasedSignature, getSignature, getSimpleDescription, isEquivalentTo, isFinal, isNonPublic, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, toStringpublic CodeGenerator getCodeGenerator()
public CodeGenerator getCodeGenerator(int initialSize)
public java.lang.String getName()
getName in class MethodInfopublic Type<?> getReturnType()
getReturnType in class MethodInfopublic SignatureType getSignatureType()
getSignatureType in class MethodBasepublic java.lang.reflect.Method getRawMethod()
getRawMethod in class MethodInfopublic java.lang.Object getDefaultValue()
getDefaultValue in class MethodInfopublic void setDefaultValue(java.lang.Object value)
public TypeBuilder<?> getDeclaringType()
getDeclaringType in class MemberInfopublic int getModifiers()
getModifiers in class MemberInfopublic ParameterList getParameters()
getParameters in class MethodBasepublic TypeList getThrownTypes()
getThrownTypes in class MethodBasepublic TypeList getParameterTypes()
public boolean isTypeCreated()
public boolean isFinished()
public void setReturnType(Type<?> type)
public void setParameters(TypeList types)
public void setThrownTypes(TypeList types)
public Type getReflectedType()
getReflectedType in class MemberInfopublic void addCustomAnnotation(AnnotationBuilder annotation)
public com.strobel.core.ReadOnlyList<AnnotationBuilder<? extends java.lang.annotation.Annotation>> getCustomAnnotations()
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
getAnnotation in interface java.lang.reflect.AnnotatedElementgetAnnotation in class MethodInfo@NotNull public java.lang.annotation.Annotation[] getAnnotations()
getAnnotations in interface java.lang.reflect.AnnotatedElementgetAnnotations in class MethodInfo@NotNull public java.lang.annotation.Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations in interface java.lang.reflect.AnnotatedElementgetDeclaredAnnotations in class MethodInfopublic boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
isAnnotationPresent in interface java.lang.reflect.AnnotatedElementisAnnotationPresent in class MethodInfopublic boolean isGenericMethod()
isGenericMethod in class MethodInfopublic boolean isGenericMethodDefinition()
isGenericMethodDefinition in class MethodInfopublic java.lang.StringBuilder appendDescription(java.lang.StringBuilder sb)
appendDescription in class MethodInfopublic java.lang.StringBuilder appendSimpleDescription(java.lang.StringBuilder sb)
appendSimpleDescription in class MethodInfopublic java.lang.StringBuilder appendErasedSignature(java.lang.StringBuilder sb)
appendErasedSignature in class MethodInfopublic java.lang.StringBuilder appendSignature(java.lang.StringBuilder sb)
appendSignature in class MethodInfopublic GenericParameterBuilderList defineGenericParameters(java.lang.String... names)
public ParameterBuilder defineParameter(int position, java.lang.String name)
public void createMethodBody(byte[] bytecode,
int size)