Package net.bytebuddy.description.method
Class ParameterDescription.ForLoadedParameter<T extends AccessibleObject>
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.ForLoadedParameter<T>
- Type Parameters:
T
- The type of thejava.lang.reflect.Executable
that this list represents.
- 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
- Direct Known Subclasses:
ParameterDescription.ForLoadedParameter.OfConstructor
,ParameterDescription.ForLoadedParameter.OfMethod
- Enclosing interface:
ParameterDescription
public abstract static class ParameterDescription.ForLoadedParameter<T extends AccessibleObject>
extends ParameterDescription.InDefinedShape.AbstractBase
Description of a loaded parameter with support for the information exposed by
java.lang.reflect.Parameter
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A description of a loadedConstructor
parameter for a modern VM.protected static class
Description of a loaded constructor's parameter on a virtual machine wherejava.lang.reflect.Parameter
is not available.protected static class
Description of a loaded method's parameter on a virtual machine wherejava.lang.reflect.Parameter
is not available.protected static class
A description of a loadedMethod
parameter for a modern VM.protected static interface
A proxy for ajava.lang.reflect.Parameter
.static interface
A source for querying parameter annotations.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.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
Nested 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
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.ParameterDescription.InDefinedShape
ParameterDescription.InDefinedShape.AbstractBase
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final T
Thejava.lang.reflect.Executable
for which the parameter types are described.protected final int
The parameter's index.private static final ParameterDescription.ForLoadedParameter.Parameter
A dispatcher for reading properties fromjava.lang.reflect.Parameter
instances.The parameter annotation source to query.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
ConstructorsModifierConstructorDescriptionprotected
ForLoadedParameter
(T executable, int index, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) Creates a new description for a loaded parameter. -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> T
doPrivileged
(PrivilegedAction<T> action) A proxy forjava.security.AccessController#doPrivileged
that is activated if available.int
getIndex()
Returns this parameter's index.int
Returns the modifier that is described by this object.getName()
Returns the binary name of this byte code element.boolean
Checks if this parameter has an explicit modifier.boolean
isNamed()
Returnstrue
if 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, getOffset, 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.annotation.AnnotationSource
getDeclaredAnnotations
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
Methods inherited from interface net.bytebuddy.description.method.ParameterDescription
getOffset, getType
Methods inherited from interface net.bytebuddy.description.method.ParameterDescription.InDefinedShape
getDeclaringMethod
-
Field Details
-
PARAMETER
A dispatcher for reading properties fromjava.lang.reflect.Parameter
instances. -
executable
Thejava.lang.reflect.Executable
for which the parameter types are described. -
index
protected final int indexThe parameter's index. -
parameterAnnotationSource
protected final ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSourceThe parameter annotation source to query.
-
-
Constructor Details
-
ForLoadedParameter
protected ForLoadedParameter(T executable, int index, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource) Creates a new description for a loaded parameter.- Parameters:
executable
- Thejava.lang.reflect.Executable
for which the parameter types are described.index
- The parameter's index.parameterAnnotationSource
- The parameter annotation source to query.
-
-
Method Details
-
doPrivileged
A proxy forjava.security.AccessController#doPrivileged
that is activated if available.- Type Parameters:
T
- The type of the action's resolved value.- Parameters:
action
- The action to execute from a privileged context.- Returns:
- The action's resolved 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:
getName
in interfaceNamedElement.WithRuntimeName
- Overrides:
getName
in classParameterDescription.AbstractBase
- Returns:
- The binary ame of this byte code element as visible from within a running Java application.
-
getIndex
public int getIndex()Returns this parameter's index.- Returns:
- The index of this parameter.
-
isNamed
public boolean isNamed()Returnstrue
if this element has an explicit name.- Returns:
true
if this element has an explicit name.
-
getModifiers
public int getModifiers()Returns the modifier that is described by this object.- Specified by:
getModifiers
in interfaceModifierReviewable
- Overrides:
getModifiers
in classParameterDescription.AbstractBase
- Returns:
- The modifier that is described by this object.
-
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:
true
if this parameter defines explicit modifiers.
-