Class ParameterDef

java.lang.Object
io.micronaut.sourcegen.model.ParameterDef

public final class ParameterDef extends Object
The parameter definition.
Since:
1.0
Author:
Denis Stepanov
  • Field Details

    • name

      protected final String name
    • modifiers

      protected final EnumSet<Modifier> modifiers
    • annotations

      protected final List<AnnotationDef> annotations
    • javadoc

      protected final List<String> javadoc
    • synthetic

      protected final boolean synthetic
  • Method Details

    • of

      public static ParameterDef of(String name, TypeDef type)
    • builder

      public static ParameterDef.ParameterDefBuilder builder(String name, TypeDef type)
    • resolveTypeVariables

      @Deprecated(since="2.0", forRemoval=true) public ParameterDef resolveTypeVariables(Map<String,TypeDef> resolvedTypeVariables)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Resolve the type variables for this parameter.
      Parameters:
      resolvedTypeVariables - The resolved type variables
      Returns:
      The resolved parameter
      Since:
      1.7
    • resolveTypeVariables

      public ParameterDef resolveTypeVariables(Function<String, @Nullable TypeDef> resolveVariableFn)
      Resolve the type variables for this parameter.
      Parameters:
      resolveVariableFn - The resolved variable function
      Returns:
      The resolved parameter
      Since:
      2.0
    • withName

      public ParameterDef withName(String name)
      Creates a copy of this parameter with a different name.
      Parameters:
      name - The new name
      Returns:
      The renamed parameter
      Since:
      2.2
    • getType

      public TypeDef getType()
    • asExpression

      public VariableDef asExpression()
    • asVariable

      public VariableDef.MethodParameter asVariable()
      Returns:
      Return the parameter as a variable
      Since:
      1.2
    • isSynthetic

      public boolean isSynthetic()
      Returns:
      Is synthetic element
    • getName

      public final String getName()
    • getModifiers

      public final Set<Modifier> getModifiers()
    • getModifiersArray

      public final Modifier[] getModifiersArray()
    • getAnnotations

      public final List<AnnotationDef> getAnnotations()
    • getJavadoc

      public List<String> getJavadoc()