Package net.bytebuddy.description.method
Class ParameterDescription.TypeSubstituting
java.lang.Object
net.bytebuddy.description.ModifierReviewable.AbstractBase
net.bytebuddy.description.method.ParameterDescription.AbstractBase
net.bytebuddy.description.method.ParameterDescription.TypeSubstituting
- All Implemented Interfaces:
AnnotationSource,ByteCodeElement.TypeDependant<ParameterDescription.InDefinedShape,,ParameterDescription.Token> ParameterDescription,ParameterDescription.InGenericShape,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.TypeSubstituting
extends ParameterDescription.AbstractBase
implements ParameterDescription.InGenericShape
A parameter description that represents a given parameter but with a substituted parameter type.
Note: The supplied visitor must assure to not substitute
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationSource
AnnotationSource.Empty, AnnotationSource.ExplicitNested classes/interfaces inherited from interface net.bytebuddy.description.ModifierReviewable
ModifierReviewable.AbstractBase, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumerationNested classes/interfaces inherited from interface net.bytebuddy.description.NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeNameNested classes/interfaces inherited from interface net.bytebuddy.description.method.ParameterDescription
ParameterDescription.AbstractBase, ParameterDescription.ForLoadedParameter<T extends AccessibleObject>, ParameterDescription.InDefinedShape, ParameterDescription.InGenericShape, ParameterDescription.Latent, ParameterDescription.Token, ParameterDescription.TypeSubstituting -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodDescription.InGenericShapeThe method that declares this type-substituted parameter.private final ParameterDescriptionThe represented parameter.private final TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> A visitor that is applied to the parameter type.Fields inherited from interface net.bytebuddy.description.ModifierReviewable
EMPTY_MASKFields inherited from interface net.bytebuddy.description.NamedElement
EMPTY_NAME, NO_NAMEFields inherited from interface net.bytebuddy.description.method.ParameterDescription
NAME_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionTypeSubstituting(MethodDescription.InGenericShape declaringMethod, ParameterDescription parameterDescription, TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor) Creates a new type substituting parameter. -
Method Summary
Modifier and TypeMethodDescriptionReturns this type dependant in its defined shape, i.e.Returns 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 net.bytebuddy.description.method.ParameterDescription.AbstractBase
asToken, equals, getActualName, getInternalName, hashCode, toStringMethods 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, isVolatileMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.bytebuddy.description.ByteCodeElement.TypeDependant
asTokenMethods inherited from interface net.bytebuddy.description.ModifierReviewable
getSyntheticState, isFinal, isSyntheticMethods inherited from interface net.bytebuddy.description.ModifierReviewable.ForParameterDescription
getParameterManifestation, getProvisioningState, isMandatedMethods inherited from interface net.bytebuddy.description.NamedElement
getActualNameMethods inherited from interface net.bytebuddy.description.NamedElement.WithRuntimeName
getInternalName
-
Field Details
-
declaringMethod
The method that declares this type-substituted parameter. -
parameterDescription
The represented parameter. -
visitor
A visitor that is applied to the parameter type.
-
-
Constructor Details
-
TypeSubstituting
public TypeSubstituting(MethodDescription.InGenericShape declaringMethod, ParameterDescription parameterDescription, TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor) Creates a new type substituting parameter.- Parameters:
declaringMethod- The method that declares this type-substituted parameter.parameterDescription- The represented parameter.visitor- A visitor that is applied to the parameter type.
-
-
Method Details
-
getType
Returns the type of this parameter.- Specified by:
getTypein interfaceParameterDescription- Returns:
- The type of this parameter.
-
getDeclaringMethod
Returns the method that declares this parameter.- Specified by:
getDeclaringMethodin interfaceParameterDescription- Specified by:
getDeclaringMethodin interfaceParameterDescription.InGenericShape- Returns:
- The method that declares this parameter.
-
getIndex
public int getIndex()Returns this parameter's index.- Specified by:
getIndexin interfaceParameterDescription- Returns:
- The index of this parameter.
-
isNamed
public boolean isNamed()Returnstrueif this element has an explicit name.- Specified by:
isNamedin interfaceNamedElement.WithOptionalName- 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.- Specified by:
hasModifiersin interfaceParameterDescription- Returns:
trueif this parameter defines explicit modifiers.
-
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.
-
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.- Specified by:
getDeclaredAnnotationsin interfaceAnnotationSource- Returns:
- A list of declared annotations.
-
asDefined
Returns this type dependant in its defined shape, i.e. the form it is declared in and without its type variable's resolved.- Specified by:
asDefinedin interfaceByteCodeElement.TypeDependant<ParameterDescription.InDefinedShape,ParameterDescription.Token> - Returns:
- This type dependant in its defined shape.
-