Package net.bytebuddy.description.method
Class ParameterDescription.Latent
- java.lang.Object
-
- net.bytebuddy.description.ModifierReviewable.AbstractBase
-
- net.bytebuddy.description.method.ParameterDescription.AbstractBase
-
- net.bytebuddy.description.method.ParameterDescription.InDefinedShape.AbstractBase
-
- net.bytebuddy.description.method.ParameterDescription.Latent
-
- All Implemented Interfaces:
AnnotationSource,ByteCodeElement.TypeDependant<ParameterDescription.InDefinedShape,ParameterDescription.Token>,ParameterDescription,ParameterDescription.InDefinedShape,ModifierReviewable,ModifierReviewable.ForFieldDescription,ModifierReviewable.ForMethodDescription,ModifierReviewable.ForParameterDescription,ModifierReviewable.ForTypeDefinition,ModifierReviewable.OfAbstraction,ModifierReviewable.OfByteCodeElement,ModifierReviewable.OfEnumeration,NamedElement,NamedElement.WithOptionalName,NamedElement.WithRuntimeName
- Enclosing interface:
- ParameterDescription
public static class ParameterDescription.Latent extends ParameterDescription.InDefinedShape.AbstractBase
A latent description of a parameter that is not attached to a method or constructor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationSource
AnnotationSource.Empty, AnnotationSource.Explicit
-
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.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.ParameterDescription
ParameterDescription.AbstractBase, ParameterDescription.ForLoadedParameter<T extends java.lang.reflect.AccessibleObject>, ParameterDescription.InDefinedShape, ParameterDescription.InGenericShape, ParameterDescription.Latent, ParameterDescription.Token, ParameterDescription.TypeSubstituting
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.ParameterDescription.InDefinedShape
ParameterDescription.InDefinedShape.AbstractBase
-
-
Field Summary
-
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.method.ParameterDescription
NAME_PREFIX
-
-
Constructor Summary
Constructors Constructor Description Latent(MethodDescription.InDefinedShape declaringMethod, ParameterDescription.Token token, int index, int offset)Creates a latent parameter description.Latent(MethodDescription.InDefinedShape declaringMethod, TypeDescription.Generic parameterType, int index, int offset)Creates a new latent parameter descriptions for a parameter without explicit meta data or annotations.Latent(MethodDescription.InDefinedShape declaringMethod, TypeDescription.Generic parameterType, java.util.List<? extends AnnotationDescription> declaredAnnotations, java.lang.String name, java.lang.Integer modifiers, int index, int offset)Creates a latent parameter description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationListgetDeclaredAnnotations()Returns a list of annotations that are declared by this instance.MethodDescription.InDefinedShapegetDeclaringMethod()Returns the method that declares this parameter.intgetIndex()Returns this parameter's index.intgetModifiers()Returns the modifier that is described by this object.java.lang.StringgetName()Returns the internalName of this byte code element.intgetOffset()Returns the offset to the parameter value within the local method variable.TypeDescription.GenericgetType()Returns the type of this parameter.booleanhasModifiers()Checks if this parameter has an explicit modifier.booleanisNamed()Returnstrueif this element has an explicit name.-
Methods inherited from class net.bytebuddy.description.method.ParameterDescription.InDefinedShape.AbstractBase
asDefined
-
Methods inherited from class net.bytebuddy.description.method.ParameterDescription.AbstractBase
asToken, equals, getActualName, getInternalName, hashCode, toString
-
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, isSynthetic, 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.TypeDependant
asToken
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable
getSyntheticState, isFinal, isSynthetic
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.ForParameterDescription
getParameterManifestation, getProvisioningState, isMandated
-
Methods inherited from interface net.bytebuddy.description.NamedElement
getActualName
-
Methods inherited from interface net.bytebuddy.description.NamedElement.WithRuntimeName
getInternalName
-
-
-
-
Constructor Detail
-
Latent
public Latent(MethodDescription.InDefinedShape declaringMethod, ParameterDescription.Token token, int index, int offset)
Creates a latent parameter description. All provided types are attached to this instance before they are returned.- Parameters:
declaringMethod- The method that is declaring the parameter.token- The token describing the shape of the parameter.index- The index of the parameter.offset- The parameter's offset in the local method variables array.
-
Latent
public Latent(MethodDescription.InDefinedShape declaringMethod, TypeDescription.Generic parameterType, int index, int offset)
Creates a new latent parameter descriptions for a parameter without explicit meta data or annotations.- Parameters:
declaringMethod- The method declaring this parameter.parameterType- The type of the parameter.index- The index of the parameter.offset- The offset of the parameter.
-
Latent
public Latent(MethodDescription.InDefinedShape declaringMethod, TypeDescription.Generic parameterType, java.util.List<? extends AnnotationDescription> declaredAnnotations, java.lang.String name, java.lang.Integer modifiers, int index, int offset)
Creates a latent parameter description. All provided types are attached to this instance before they are returned.- Parameters:
declaringMethod- The method that is declaring the parameter.parameterType- The parameter's type.declaredAnnotations- The annotations of the parameter.name- The name of the parameter ornullif no name is explicitly defined.modifiers- The modifiers of the parameter ornullif no modifiers are explicitly defined.index- The index of the parameter.offset- The parameter's offset in the local method variables array.
-
-
Method Detail
-
getType
public TypeDescription.Generic getType()
Description copied from interface:ParameterDescriptionReturns the type of this parameter.- Returns:
- The type of this parameter.
-
getDeclaringMethod
public MethodDescription.InDefinedShape getDeclaringMethod()
Description copied from interface:ParameterDescriptionReturns the method that declares this parameter.- Returns:
- The method that declares this parameter.
-
getIndex
public int getIndex()
Description copied from interface:ParameterDescriptionReturns this parameter's index.- Returns:
- The index of this parameter.
-
getOffset
public int getOffset()
Description copied from interface:ParameterDescriptionReturns the offset to the parameter value within the local method variable.- Specified by:
getOffsetin interfaceParameterDescription- Overrides:
getOffsetin classParameterDescription.AbstractBase- Returns:
- The offset of this parameter's value.
-
isNamed
public boolean isNamed()
Description copied from interface:NamedElement.WithOptionalNameReturnstrueif this element has an explicit name.- Returns:
trueif this element has an explicit name.
-
hasModifiers
public boolean hasModifiers()
Description copied from interface:ParameterDescriptionChecks if this parameter has an explicit modifier. A parameter without a modifier is simply treated as if it had a modifier of zero.- Returns:
trueif this parameter defines explicit modifiers.
-
getName
public java.lang.String getName()
Description copied from interface:NamedElement.WithRuntimeNameReturns the internalName of this byte code element.- Specified by:
getNamein interfaceNamedElement.WithRuntimeName- Overrides:
getNamein classParameterDescription.AbstractBase- Returns:
- The internalName of this byte code element as visible from within a running Java application.
-
getModifiers
public int getModifiers()
Description copied from interface:ModifierReviewableReturns the modifier that is described by this object.- Specified by:
getModifiersin interfaceModifierReviewable- Overrides:
getModifiersin classParameterDescription.AbstractBase- Returns:
- The modifier that is described by this object.
-
getDeclaredAnnotations
public AnnotationList getDeclaredAnnotations()
Description copied from interface:AnnotationSourceReturns a list of annotations that are declared by this instance.- Returns:
- A list of declared annotations.
-
-