public static class MethodDescription.ForLoadedConstructor extends MethodDescription.InDefinedShape.AbstractBase
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.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
AnnotationSource.Empty, AnnotationSource.Explicit
CONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME, TYPE_INITIALIZER_MODIFIER, UNDEFINED
EMPTY_MASK
NON_GENERIC_SIGNATURE
EMPTY_NAME, NO_NAME
Constructor and Description |
---|
ForLoadedConstructor(Constructor<?> constructor)
Creates a new immutable method description for a loaded constructor.
|
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.
|
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 |
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.
|
asDefined
accept, asSignatureToken, asToken, asTypeToken, equals, getActualModifiers, getActualModifiers, getActualModifiers, getActualName, getDefaultValue, getEnclosingSource, getGenericSignature, getStackSize, hashCode, isAccessibleTo, isBootstrap, isBootstrap, isBridgeCompatible, isDefaultMethod, isDefaultValue, isDefaultValue, isGenerified, isInvokableOn, isMethod, isSpecializableFor, isVirtual, isVisibleTo, toGenericString, toString
findVariable
getEnumerationState, getFieldManifestation, getMethodManifestation, getMethodStrictness, getOwnership, getParameterManifestation, getProvisioningState, getSynchronizationState, getSyntheticState, getTypeManifestation, getVisibility, isAbstract, isAnnotation, isBridge, 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, isBootstrap, isBootstrap, isBridgeCompatible, isDefaultMethod, isDefaultValue, isDefaultValue, isInvokableOn, isMethod, isSpecializableFor, isVirtual
accept, findVariable, getEnclosingSource, isGenerified
getMethodManifestation, getMethodStrictness, getSynchronizationState, isBridge, isNative, isStrict, isSynchronized, isVarArgs
isAbstract
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
getSyntheticState, isFinal
toGenericString
getGenericSignature, isAccessibleTo, isVisibleTo
getActualName
asToken
public ForLoadedConstructor(Constructor<?> constructor)
constructor
- The loaded constructor to be represented by this method description.public TypeDescription getDeclaringType()
DeclaredByType
null
if no such type exists.public TypeDescription.Generic getReturnType()
MethodDescription
public ParameterList<ParameterDescription.InDefinedShape> getParameters()
MethodDescription
public TypeList.Generic getExceptionTypes()
MethodDescription
public boolean isConstructor()
MethodDescription
isConstructor
in interface MethodDescription
isConstructor
in class MethodDescription.AbstractBase
true
if this method description represents a constructor.public boolean isTypeInitializer()
MethodDescription
isTypeInitializer
in interface MethodDescription
isTypeInitializer
in class MethodDescription.AbstractBase
true
if this method description represents a type initializer.public boolean represents(Method method)
MethodDescription
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)
MethodDescription
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()
NamedElement.WithRuntimeName
getName
in interface NamedElement.WithRuntimeName
getName
in class MethodDescription.AbstractBase
public int getModifiers()
ModifierReviewable
public boolean isSynthetic()
ModifierReviewable
isSynthetic
in interface ModifierReviewable
isSynthetic
in class ModifierReviewable.AbstractBase
true
if the modifier described by this object is synthetic.public String getInternalName()
NamedElement.WithRuntimeName
public String getDescriptor()
ByteCodeElement
getDescriptor
in interface ByteCodeElement
getDescriptor
in class MethodDescription.AbstractBase
public AnnotationValue<?,?> getDefaultValue()
MethodDescription
null
if no default value is defined for this method.null
if no default value is defined for this method.public AnnotationList getDeclaredAnnotations()
AnnotationSource
public TypeList.Generic getTypeVariables()
TypeVariableSource
public TypeDescription.Generic getReceiverType()
MethodDescription
static
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 MethodDescription
getReceiverType
in class MethodDescription.InDefinedShape.AbstractBase
Copyright © 2014–2017. All rights reserved.