public static class MethodDescription.ForLoadedMethod extends MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<Method> implements ParameterDescription.ForLoadedParameter.ParameterAnnotationSource
MethodDescription.InDefinedShape.AbstractBase.Executable, MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<T extends AnnotatedElement>
ParameterDescription.ForLoadedParameter.ParameterAnnotationSource.ForLoadedConstructor, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource.ForLoadedMethod
MethodDescription.InDefinedShape.AbstractBase
MethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.InDefinedShape, MethodDescription.InGenericShape, MethodDescription.Latent, MethodDescription.SignatureToken, MethodDescription.Token, MethodDescription.TypeSubstituting, MethodDescription.TypeToken
TypeVariableSource.Visitor<T>
ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
DeclaredByType.WithMandatoryDeclaration
AnnotationSource.Empty, AnnotationSource.Explicit
executable, EXECUTABLE
CONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME, TYPE_INITIALIZER_MODIFIER, UNDEFINED
EMPTY_MASK
NON_GENERIC_SIGNATURE
EMPTY_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 name 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 binary name of this byte code element.
|
Annotation[][] |
getParameterAnnotations()
Returns the parameter annotations represented by this source.
|
ParameterList<ParameterDescription.InDefinedShape> |
getParameters()
Returns a list of this method's parameters.
|
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.
|
getReceiverType
asDefined
accept, asSignatureToken, asToken, asTypeToken, equals, getActualModifiers, getActualModifiers, getActualModifiers, getActualName, getDefaultValue, getEnclosingSource, getGenericSignature, getStackSize, hashCode, isAccessibleTo, isBridgeCompatible, isConstantBootstrap, isConstantBootstrap, isDefaultMethod, isDefaultValue, isDefaultValue, isGenerified, isInferrable, isInvokableOn, isInvokeBootstrap, isInvokeBootstrap, isMethod, isSpecializableFor, isVirtual, isVisibleTo, toGenericString, toSafeString, toString
findExpectedVariable, findVariable
getEnumerationState, getFieldManifestation, getFieldPersistence, getMethodManifestation, getMethodStrictness, getOwnership, getParameterManifestation, getProvisioningState, getSynchronizationState, getSyntheticState, getTypeManifestation, getVisibility, isAbstract, isAnnotation, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isTransient, isVarArgs, isVolatile
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asSignatureToken, asTypeToken, getActualModifiers, getActualModifiers, getActualModifiers, getDefaultValue, getStackSize, isBridgeCompatible, isConstantBootstrap, isConstantBootstrap, isDefaultMethod, isDefaultValue, isDefaultValue, isInvokableOn, isInvokeBootstrap, isInvokeBootstrap, isMethod, isSpecializableFor, isVirtual
accept, findExpectedVariable, findVariable, getEnclosingSource, isGenerified, isInferrable
getMethodManifestation, getMethodStrictness, getSynchronizationState, isNative, isStrict, isSynchronized, isVarArgs
isAbstract
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
getSyntheticState, isFinal
toGenericString
isAccessibleTo, isVisibleTo
getGenericSignature
getActualName
asToken
public ForLoadedMethod(Method method)
method
- The loaded method to be represented by this method description.@Nonnull public TypeDescription getDeclaringType()
getDeclaringType
in interface DeclaredByType
getDeclaringType
in interface DeclaredByType.WithMandatoryDeclaration
getDeclaringType
in interface MethodDescription.InDefinedShape
null
if no such type exists.public TypeDescription.Generic getReturnType()
getReturnType
in interface MethodDescription
@CachedReturnPlugin.Enhance(value="parameters") public ParameterList<ParameterDescription.InDefinedShape> getParameters()
getParameters
in interface MethodDescription
getParameters
in interface MethodDescription.InDefinedShape
public TypeList.Generic getExceptionTypes()
getExceptionTypes
in interface MethodDescription
public boolean isConstructor()
isConstructor
in interface MethodDescription
isConstructor
in class MethodDescription.AbstractBase
true
if this method description represents a constructor.public boolean isTypeInitializer()
isTypeInitializer
in interface MethodDescription
isTypeInitializer
in class MethodDescription.AbstractBase
true
if this method description represents a type initializer.public boolean isBridge()
isBridge
in interface ModifierReviewable.ForMethodDescription
isBridge
in class ModifierReviewable.AbstractBase
true
if the modifier described by this object represents the bridge flagpublic boolean represents(Method method)
represents
in interface MethodDescription
represents
in class MethodDescription.AbstractBase
method
- The method to be checked.true
if this method description represents the given loaded method.public boolean represents(Constructor<?> constructor)
represents
in interface MethodDescription
represents
in class MethodDescription.AbstractBase
constructor
- The constructor to be checked.true
if this method description represents the given loaded constructor.public String getName()
getName
in interface NamedElement.WithRuntimeName
getName
in class MethodDescription.AbstractBase
public int getModifiers()
getModifiers
in interface ModifierReviewable
public boolean isSynthetic()
isSynthetic
in interface ModifierReviewable
isSynthetic
in class ModifierReviewable.AbstractBase
true
if the modifier described by this object is synthetic.public String getInternalName()
getInternalName
in interface NamedElement.WithRuntimeName
public String getDescriptor()
getDescriptor
in interface NamedElement.WithDescriptor
getDescriptor
in class MethodDescription.AbstractBase
public Method getLoadedMethod()
@CachedReturnPlugin.Enhance(value="declaredAnnotations") public AnnotationList getDeclaredAnnotations()
getDeclaredAnnotations
in interface AnnotationSource
@MaybeNull public AnnotationValue<?,?> getDefaultValue()
null
if no default value is defined for this method.getDefaultValue
in interface MethodDescription
null
if no default value is defined for this method.public TypeList.Generic getTypeVariables()
getTypeVariables
in interface TypeVariableSource
@CachedReturnPlugin.Enhance(value="parameterAnnotations") public Annotation[][] getParameterAnnotations()
getParameterAnnotations
in interface ParameterDescription.ForLoadedParameter.ParameterAnnotationSource
Copyright © 2014–2023. All rights reserved.