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.ForModuleDescription, ModifierReviewable.ForModuleRequirement, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration, ModifierReviewable.OfMandatable, 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 AnnotationSource
AnnotationSource.Empty, AnnotationSource.ExplicitNested classes/interfaces inherited from interface ModifierReviewable
ModifierReviewable.AbstractBase, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForModuleDescription, ModifierReviewable.ForModuleRequirement, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration, ModifierReviewable.OfMandatableNested classes/interfaces inherited from interface NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeNameNested classes/interfaces inherited from interface ParameterDescription
ParameterDescription.AbstractBase, ParameterDescription.ForLoadedParameter<T>, ParameterDescription.InDefinedShape, ParameterDescription.InGenericShape, ParameterDescription.Latent, ParameterDescription.Token, ParameterDescription.TypeSubstitutingNested classes/interfaces inherited from interface ParameterDescription.InDefinedShape
ParameterDescription.InDefinedShape.AbstractBase -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<? extends AnnotationDescription> The annotations of the parameter.private final MethodDescription.InDefinedShapeThe method that is declaring the parameter.private final intThe index of the parameter.private final IntegerThe modifiers of the parameter ornullif no modifiers are explicitly defined.private final StringThe name of the parameter ornullif no name is explicitly defined.private final intThe parameter's offset in the local method variables array.private final TypeDescription.GenericThe type of the parameter.Fields inherited from interface ModifierReviewable
EMPTY_MASKFields inherited from interface NamedElement
EMPTY_NAME, NO_NAMEFields inherited from interface ParameterDescription
NAME_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionLatent(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, List<? extends AnnotationDescription> declaredAnnotations, String name, Integer modifiers, int index, int offset) Creates a latent parameter description. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of annotations that are declared by this instance.Returns the method that declares this parameter.intgetIndex()Returns this parameter's index.intReturns the modifier that is described by this object.getName()Returns the binary name of this byte code element.intReturns the offset to the parameter value within the local method variable.getType()Returns the type of this parameter.booleanChecks if this parameter has an explicit modifier.booleanisNamed()Returnstrueif this element has an explicit name.Methods inherited from class ParameterDescription.InDefinedShape.AbstractBase
asDefinedMethods inherited from class ParameterDescription.AbstractBase
asToken, equals, getActualName, getInternalName, hashCode, toStringMethods inherited from class ModifierReviewable.AbstractBase
getEnumerationState, getFieldManifestation, getFieldPersistence, getMandate, getMethodManifestation, getMethodStrictness, getOpenness, getOwnership, getParameterManifestation, getProvisioningState, getRequiredPhase, getSynchronizationState, getSyntheticState, getTransitivity, getTypeManifestation, getVisibility, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isOpen, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStaticPhase, isStrict, isSynchronized, isSynthetic, isTransient, isTransitive, isVarArgs, isVolatileMethods inherited from interface ByteCodeElement.TypeDependant
asTokenMethods inherited from interface ModifierReviewable
getSyntheticState, isFinal, isSyntheticMethods inherited from interface ModifierReviewable.ForParameterDescription
getParameterManifestation, getProvisioningStateMethods inherited from interface ModifierReviewable.OfMandatable
getMandate, isMandatedMethods inherited from interface NamedElement
getActualNameMethods inherited from interface NamedElement.WithRuntimeName
getInternalName
-
Field Details
-
declaringMethod
The method that is declaring the parameter. -
parameterType
The type of the parameter. -
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
private final int indexThe index of the parameter. -
offset
private final int offsetThe parameter's offset in the local method variables array.
-
-
Constructor Details
-
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, List<? extends AnnotationDescription> declaredAnnotations, @MaybeNull String name, @MaybeNull 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 Details
-
getType
Returns the type of this parameter.- Returns:
- The type of this parameter.
-
getDeclaringMethod
Returns the method that declares this parameter.- Returns:
- The method that declares this parameter.
-
getIndex
public int getIndex()Returns this parameter's index.- Returns:
- The index of this parameter.
-
getOffset
public int getOffset()Returns 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()Returnstrueif this element has an explicit name.- Returns:
trueif this element has an explicit name.
-
hasModifiers
public boolean hasModifiers()Checks 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
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:
getNamein interfaceNamedElement.WithRuntimeName- Overrides:
getNamein classParameterDescription.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:
getModifiersin interfaceModifierReviewable- Overrides:
getModifiersin classParameterDescription.AbstractBase- Returns:
- The modifier that is described by this object.
-
getDeclaredAnnotations
Returns a list of annotations that are declared by this instance.- Returns:
- A list of declared annotations.
-