Package net.bytebuddy.description.method
Class MethodDescription.ForLoadedConstructor
java.lang.Object
net.bytebuddy.description.ModifierReviewable.AbstractBase
net.bytebuddy.description.TypeVariableSource.AbstractBase
net.bytebuddy.description.method.MethodDescription.AbstractBase
net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase
net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<Constructor<?>>
net.bytebuddy.description.method.MethodDescription.ForLoadedConstructor
- All Implemented Interfaces:
AnnotationSource
,ByteCodeElement
,ByteCodeElement.TypeDependant<MethodDescription.InDefinedShape,
,MethodDescription.Token> DeclaredByType
,DeclaredByType.WithMandatoryDeclaration
,MethodDescription
,MethodDescription.InDefinedShape
,ParameterDescription.ForLoadedParameter.ParameterAnnotationSource
,ModifierReviewable
,ModifierReviewable.ForFieldDescription
,ModifierReviewable.ForMethodDescription
,ModifierReviewable.ForParameterDescription
,ModifierReviewable.ForTypeDefinition
,ModifierReviewable.OfAbstraction
,ModifierReviewable.OfByteCodeElement
,ModifierReviewable.OfEnumeration
,NamedElement
,NamedElement.WithDescriptor
,NamedElement.WithGenericName
,NamedElement.WithRuntimeName
,TypeVariableSource
- Enclosing interface:
- MethodDescription
public static class MethodDescription.ForLoadedConstructor
extends MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<Constructor<?>>
implements ParameterDescription.ForLoadedParameter.ParameterAnnotationSource
An implementation of a method description for a loaded constructor.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase
MethodDescription.InDefinedShape.AbstractBase.Executable, MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<T extends AnnotatedElement>
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationSource
AnnotationSource.Empty, AnnotationSource.Explicit
Nested classes/interfaces inherited from interface net.bytebuddy.description.ByteCodeElement
ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,
S>, S extends ByteCodeElement.Token<S>> Nested classes/interfaces inherited from interface net.bytebuddy.description.DeclaredByType
DeclaredByType.WithMandatoryDeclaration
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.MethodDescription
MethodDescription.AbstractBase, MethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.InDefinedShape, MethodDescription.InGenericShape, MethodDescription.Latent, MethodDescription.SignatureToken, MethodDescription.Token, MethodDescription.TypeSubstituting, MethodDescription.TypeToken
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.MethodDescription.InDefinedShape
MethodDescription.InDefinedShape.AbstractBase
Nested classes/interfaces inherited from interface net.bytebuddy.description.ModifierReviewable
ModifierReviewable.AbstractBase, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
Nested classes/interfaces inherited from interface net.bytebuddy.description.NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.ParameterDescription.ForLoadedParameter.ParameterAnnotationSource
ParameterDescription.ForLoadedParameter.ParameterAnnotationSource.ForLoadedConstructor, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource.ForLoadedMethod
Nested classes/interfaces inherited from interface net.bytebuddy.description.TypeVariableSource
TypeVariableSource.AbstractBase, TypeVariableSource.Visitor<T>
-
Field Summary
Fields inherited from class net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable
executable, EXECUTABLE
Fields inherited from interface net.bytebuddy.description.method.MethodDescription
CONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME, TYPE_INITIALIZER_MODIFIER, UNDEFINED
Fields inherited from interface net.bytebuddy.description.ModifierReviewable
EMPTY_MASK
Fields inherited from interface net.bytebuddy.description.NamedElement
EMPTY_NAME, NO_NAME
Fields inherited from interface net.bytebuddy.description.NamedElement.WithDescriptor
NON_GENERIC_SIGNATURE
Fields inherited from interface net.bytebuddy.description.TypeVariableSource
UNDEFINED
-
Constructor Summary
ConstructorsConstructorDescriptionForLoadedConstructor
(Constructor<?> constructor) Creates a new immutable method description for a loaded constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of annotations that are declared by this instance.Returns the declaring type of this instance.AnnotationValue<?,
?> Returns the method's default annotation value ornull
if no default value is defined for this method.Returns the descriptor of this byte code element.Returns the exception types of the described method.Returns the internal name of this byte code element.int
Returns the modifier that is described by this object.getName()
Returns the binary name of this byte code element.Annotation[][]
Returns the parameter annotations represented by this source.Returns a list of this method's parameters.Returns the return type of the described method.Returns the type variables that are declared by this element.boolean
Checks if this method description represents a constructor.boolean
Specifies if the modifier described by this object is synthetic.boolean
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.Methods inherited from class net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable
getReceiverType
Methods inherited from class net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase
asDefined
Methods inherited from class net.bytebuddy.description.method.MethodDescription.AbstractBase
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, toString
Methods inherited from class net.bytebuddy.description.TypeVariableSource.AbstractBase
findExpectedVariable, findVariable
Methods inherited from class net.bytebuddy.description.ModifierReviewable.AbstractBase
getEnumerationState, getFieldManifestation, getFieldPersistence, 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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.bytebuddy.description.ByteCodeElement
isAccessibleTo, isVisibleTo
Methods inherited from interface net.bytebuddy.description.ByteCodeElement.TypeDependant
asToken
Methods inherited from interface net.bytebuddy.description.method.MethodDescription
asSignatureToken, asTypeToken, getActualModifiers, getActualModifiers, getActualModifiers, getDefaultValue, getStackSize, isBridgeCompatible, isConstantBootstrap, isConstantBootstrap, isDefaultMethod, isDefaultValue, isDefaultValue, isInvokableOn, isInvokeBootstrap, isInvokeBootstrap, isMethod, isSpecializableFor, isVirtual
Methods inherited from interface net.bytebuddy.description.ModifierReviewable
getSyntheticState, isFinal
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.ForMethodDescription
getMethodManifestation, getMethodStrictness, getSynchronizationState, isBridge, isNative, isStrict, isSynchronized, isVarArgs
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfAbstraction
isAbstract
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfByteCodeElement
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
Methods inherited from interface net.bytebuddy.description.NamedElement
getActualName
Methods inherited from interface net.bytebuddy.description.NamedElement.WithDescriptor
getGenericSignature
Methods inherited from interface net.bytebuddy.description.NamedElement.WithGenericName
toGenericString
Methods inherited from interface net.bytebuddy.description.TypeVariableSource
accept, findExpectedVariable, findVariable, getEnclosingSource, isGenerified, isInferrable
-
Constructor Details
-
ForLoadedConstructor
Creates a new immutable method description for a loaded constructor.- Parameters:
constructor
- The loaded constructor to be represented by this method description.
-
-
Method Details
-
getDeclaringType
Returns the declaring type of this instance.- Specified by:
getDeclaringType
in interfaceDeclaredByType
- Specified by:
getDeclaringType
in interfaceDeclaredByType.WithMandatoryDeclaration
- Specified by:
getDeclaringType
in interfaceMethodDescription.InDefinedShape
- Returns:
- The declaring type or
null
if no such type exists.
-
getReturnType
Returns the return type of the described method.- Specified by:
getReturnType
in interfaceMethodDescription
- Returns:
- The return type of the described method.
-
getParameters
Returns a list of this method's parameters.- Specified by:
getParameters
in interfaceMethodDescription
- Specified by:
getParameters
in interfaceMethodDescription.InDefinedShape
- Returns:
- A list of this method's parameters.
-
getExceptionTypes
Returns the exception types of the described method.- Specified by:
getExceptionTypes
in interfaceMethodDescription
- Returns:
- The exception types of the described method.
-
isConstructor
public boolean isConstructor()Checks if this method description represents a constructor.- Specified by:
isConstructor
in interfaceMethodDescription
- Overrides:
isConstructor
in classMethodDescription.AbstractBase
- Returns:
true
if this method description represents a constructor.
-
isTypeInitializer
public boolean isTypeInitializer()Checks if this method is a type initializer.- Specified by:
isTypeInitializer
in interfaceMethodDescription
- Overrides:
isTypeInitializer
in classMethodDescription.AbstractBase
- Returns:
true
if this method description represents a type initializer.
-
represents
Verifies if a method description represents a given loaded method.- Specified by:
represents
in interfaceMethodDescription
- Overrides:
represents
in classMethodDescription.AbstractBase
- Parameters:
method
- The method to be checked.- Returns:
true
if this method description represents the given loaded method.
-
represents
Verifies if a method description represents a given loaded constructor.- Specified by:
represents
in interfaceMethodDescription
- Overrides:
represents
in classMethodDescription.AbstractBase
- Parameters:
constructor
- The constructor to be checked.- Returns:
true
if this method description represents the given loaded constructor.
-
getName
Returns the binary name of this byte code element. If no well-defined internal name is known for this element, the actual name is returned.- Specified by:
getName
in interfaceNamedElement.WithRuntimeName
- Overrides:
getName
in classMethodDescription.AbstractBase
- Returns:
- The binary ame of this byte code element as visible from within a running Java application.
-
getModifiers
public int getModifiers()Returns the modifier that is described by this object.- Specified by:
getModifiers
in interfaceModifierReviewable
- Returns:
- The modifier that is described by this object.
-
isSynthetic
public boolean isSynthetic()Specifies if the modifier described by this object is synthetic.- Specified by:
isSynthetic
in interfaceModifierReviewable
- Overrides:
isSynthetic
in classModifierReviewable.AbstractBase
- Returns:
true
if the modifier described by this object is synthetic.
-
getInternalName
Returns the internal name of this byte code element. If no well-defined internal name is known for this element, the actual name is returned.- Specified by:
getInternalName
in interfaceNamedElement.WithRuntimeName
- Returns:
- The internal name of this byte code element as used within the Java class file format.
-
getDescriptor
Returns the descriptor of this byte code element.- Specified by:
getDescriptor
in interfaceNamedElement.WithDescriptor
- Overrides:
getDescriptor
in classMethodDescription.AbstractBase
- Returns:
- The descriptor of this byte code element.
-
getDefaultValue
Returns the method's default annotation value ornull
if no default value is defined for this method.- Specified by:
getDefaultValue
in interfaceMethodDescription
- Returns:
- The method's default annotation value or
null
if no default value is defined for this method.
-
getDeclaredAnnotations
Returns a list of annotations that are declared by this instance.- Specified by:
getDeclaredAnnotations
in interfaceAnnotationSource
- Returns:
- A list of declared annotations.
-
getTypeVariables
Returns the type variables that are declared by this element.- Specified by:
getTypeVariables
in interfaceTypeVariableSource
- Returns:
- The type variables that are declared by this element.
-
getParameterAnnotations
Returns the parameter annotations represented by this source.- Specified by:
getParameterAnnotations
in interfaceParameterDescription.ForLoadedParameter.ParameterAnnotationSource
- Returns:
- The parameter annotations as an array indexed by parameter index.
-