Interface ParameterInfo

All Superinterfaces:
AnnotationTarget, DeclarationInfo

public interface ParameterInfo extends DeclarationInfo
A method parameter or a constructor parameter, declared in some method or constructor.
Since:
4.0
  • Method Details

    • name

      String name()
      Returns the name of this parameter, if it is known. Method parameter names may not always be known, in which case a synthetic name of the form argN, where N is zero-based parameter position in the method declaration, is returned.
      Returns:
      the name of this parameter, or a synthetic name, never null
    • type

      Type type()
      Returns the type of this parameter.
      Returns:
      the type of this parameter, never null
    • declaringMethod

      MethodInfo declaringMethod()
      Returns the method that declares this parameter.
      Returns:
      the method that declares this parameter, never null
    • kind

      default DeclarationInfo.Kind kind()
      Description copied from interface: DeclarationInfo
      Returns the kind of this declaration.
      Specified by:
      kind in interface DeclarationInfo
      Returns:
      the kind of this declaration
    • asParameter

      default ParameterInfo asParameter()
      Description copied from interface: DeclarationInfo
      Returns this declaration as a method parameter.
      Specified by:
      asParameter in interface DeclarationInfo
      Returns:
      this parameter, never null