public static class MethodDescription.ForLoadedMethod extends MethodDescription.InDefinedShape.AbstractBase
MethodDescription.InDefinedShape.AbstractBaseMethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.InDefinedShape, MethodDescription.InGenericShape, MethodDescription.Latent, MethodDescription.SignatureToken, MethodDescription.Token, MethodDescription.TypeSubstituting, MethodDescription.TypeTokenTypeVariableSource.Visitor<T>ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumerationByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeNameCONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME, TYPE_INITIALIZER_MODIFIER, UNDEFINEDEMPTY_MASKNON_GENERIC_SIGNATUREEMPTY_NAME, NO_NAME| Constructor and Description |
|---|
ForLoadedMethod(Method method)
Creates a new immutable method description for a loaded method.
|
| Modifier and Type | Method and Description |
|---|---|
AnnotationList |
getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.
|
TypeDescription |
getDeclaringType()
Returns the declaring type of this instance.
|
AnnotationValue<?,?> |
getDefaultValue()
Returns the method's default annotation value or
null if no default value is defined for this method. |
String |
getDescriptor()
Returns the descriptor of this byte code element.
|
TypeList.Generic |
getExceptionTypes()
Returns the exception types of the described method.
|
String |
getInternalName()
Returns the internal internalName of this byte code element.
|
Method |
getLoadedMethod()
Returns the loaded method that is represented by this method description.
|
int |
getModifiers()
Returns the modifier that is described by this object.
|
String |
getName()
Returns the internalName of this byte code element.
|
ParameterList<ParameterDescription.InDefinedShape> |
getParameters()
Returns a list of this method's parameters.
|
TypeDescription.Generic |
getReceiverType()
Returns this methods receiver type.
|
TypeDescription.Generic |
getReturnType()
Returns the return type of the described method.
|
TypeList.Generic |
getTypeVariables()
Returns the type variables that are declared by this element.
|
boolean |
isBridge()
Specifies if the modifier described by this object represents the bridge flag.
|
boolean |
isConstructor()
Checks if this method description represents a constructor.
|
boolean |
isSynthetic()
Specifies if the modifier described by this object is synthetic.
|
boolean |
isTypeInitializer()
Checks if this method is a type initializer.
|
boolean |
represents(Constructor<?> constructor)
Verifies if a method description represents a given loaded constructor.
|
boolean |
represents(Method method)
Verifies if a method description represents a given loaded method.
|
asDefinedaccept, asSignatureToken, asToken, asTypeToken, equals, getActualModifiers, getActualModifiers, getActualName, getDefaultValue, getEnclosingSource, getGenericSignature, getStackSize, hashCode, isBootstrap, isBootstrap, isDefaultMethod, isDefaultValue, isDefaultValue, isGenericDeclaration, isInvokableOn, isMethod, isSpecializableFor, isVirtual, isVisibleTo, toGenericString, toStringfindVariableisAbstract, isAnnotation, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isTransient, isVarArgs, isVolatileclone, finalize, getClass, notify, notifyAll, wait, wait, waitasSignatureToken, asTypeToken, getActualModifiers, getActualModifiers, getDefaultValue, getStackSize, isBootstrap, isBootstrap, isDefaultMethod, isDefaultValue, isDefaultValue, isInvokableOn, isMethod, isSpecializableFor, isVirtualaccept, findVariable, getEnclosingSource, isGenericDeclarationisNative, isStrict, isSynchronized, isVarArgsisAbstractisDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStaticisFinaltoGenericStringgetGenericSignature, isVisibleTogetActualNameasTokenpublic ForLoadedMethod(Method method)
method - The loaded method to be represented by this method description.public TypeDescription getDeclaringType()
DeclaredByTypenull if no such type exists.public TypeDescription.Generic getReturnType()
MethodDescriptionpublic ParameterList<ParameterDescription.InDefinedShape> getParameters()
MethodDescriptionpublic TypeList.Generic getExceptionTypes()
MethodDescriptionpublic boolean isConstructor()
MethodDescriptionisConstructor in interface MethodDescriptionisConstructor in class MethodDescription.AbstractBasetrue if this method description represents a constructor.public boolean isTypeInitializer()
MethodDescriptionisTypeInitializer in interface MethodDescriptionisTypeInitializer in class MethodDescription.AbstractBasetrue if this method description represents a type initializer.public boolean isBridge()
ModifierReviewable.ForMethodDescriptionisBridge in interface ModifierReviewable.ForMethodDescriptionisBridge in class ModifierReviewable.AbstractBasetrue if the modifier described by this object represents the bridge flagpublic boolean represents(Method method)
MethodDescriptionrepresents in interface MethodDescriptionrepresents in class MethodDescription.AbstractBasemethod - The method to be checked.true if this method description represents the given loaded method.public boolean represents(Constructor<?> constructor)
MethodDescriptionrepresents in interface MethodDescriptionrepresents in class MethodDescription.AbstractBaseconstructor - The constructor to be checked.true if this method description represents the given loaded constructor.public String getName()
NamedElement.WithRuntimeNamegetName in interface NamedElement.WithRuntimeNamegetName in class MethodDescription.AbstractBasepublic int getModifiers()
ModifierReviewablepublic boolean isSynthetic()
ModifierReviewableisSynthetic in interface ModifierReviewableisSynthetic in class ModifierReviewable.AbstractBasetrue if the modifier described by this object is synthetic.public String getInternalName()
NamedElement.WithRuntimeNamepublic String getDescriptor()
ByteCodeElementgetDescriptor in interface ByteCodeElementgetDescriptor in class MethodDescription.AbstractBasepublic Method getLoadedMethod()
public AnnotationList getDeclaredAnnotations()
AnnotatedCodeElementpublic AnnotationValue<?,?> getDefaultValue()
MethodDescriptionnull if no default value is defined for this method.null if no default value is defined for this method.public TypeList.Generic getTypeVariables()
TypeVariableSourcepublic TypeDescription.Generic getReceiverType()
MethodDescriptionstatic methods
where null is returned. Other than a receiver type that is provided by the Java reflection
API, Byte Buddy is capable of extracting annotations on type parameters of receiver types when
directly accessing a class file. Therefore, a receiver type might be parameterized.getReceiverType in interface MethodDescriptiongetReceiverType in class MethodDescription.InDefinedShape.AbstractBaseCopyright © 2014–2016. All rights reserved.