Class ParameterDescription.ForLoadedParameter.OfLegacyVmMethod

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 class:
ParameterDescription.ForLoadedParameter<T extends AccessibleObject>

protected static class ParameterDescription.ForLoadedParameter.OfLegacyVmMethod extends ParameterDescription.InDefinedShape.AbstractBase
Description of a loaded method's parameter on a virtual machine where java.lang.reflect.Parameter is not available.
  • Field Details

    • method

      private final Method method
      The method that declares this parameter.
    • index

      private final int index
      The index of this parameter.
    • parameterType

      private final Class<?>[] parameterType
      The type erasures of the represented method.
    • parameterAnnotationSource

      The parameter annotation source to query.
  • Constructor Details

    • OfLegacyVmMethod

      protected OfLegacyVmMethod(Method method, int index, Class<?>[] parameterType, ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource)
      Creates a legacy representation of a method's parameter.
      Parameters:
      method - The method that declares this parameter.
      index - The index of this parameter.
      parameterType - The type erasures of the represented method.
      parameterAnnotationSource - The parameter annotation source to query.
  • Method Details

    • getType

      public TypeDescription.Generic getType()
      Returns the type of this parameter.
      Returns:
      The type of this parameter.
    • getDeclaringMethod

      public MethodDescription.InDefinedShape 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.
    • isNamed

      public boolean isNamed()
      Returns true if this element has an explicit name.
      Returns:
      true if 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:
      true if this parameter defines explicit modifiers.
    • getDeclaredAnnotations

      public AnnotationList getDeclaredAnnotations()
      Returns a list of annotations that are declared by this instance.
      Returns:
      A list of declared annotations.