Class ParameterDescription.ForLoadedParameter<T extends AccessibleObject>

Type Parameters:
T - The type of the java.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.ForModuleDescription, ModifierReviewable.ForModuleRequirement, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration, ModifierReviewable.OfMandatable, 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.
  • Field Details

    • MALFORMED_PARAMETERS_EXCEPTION

      private static final String MALFORMED_PARAMETERS_EXCEPTION
      The name of the java.lang.reflect.MalformedParametersException. Due to compiler bugs, parameter declarations might not always be legal, and by checking for this exception, one can trigger a fallback behaviour.
      See Also:
    • PARAMETER

      private static final ParameterDescription.ForLoadedParameter.Parameter PARAMETER
      A dispatcher for reading properties from java.lang.reflect.Parameter instances.
    • executable

      protected final T extends AccessibleObject executable
      The java.lang.reflect.Executable for which the parameter types are described.
    • index

      protected final int index
      The parameter's index.
    • parameterAnnotationSource

      protected final ParameterDescription.ForLoadedParameter.ParameterAnnotationSource parameterAnnotationSource
      The 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 - The java.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

      @Enhance private static <T> T doPrivileged(PrivilegedAction<T> action)
      A proxy for java.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

      public String 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 interface NamedElement.WithRuntimeName
      Overrides:
      getName in class ParameterDescription.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()
      Returns true 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 interface ModifierReviewable
      Overrides:
      getModifiers in class ParameterDescription.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.