Class ParameterDescription.Token

    • Field Detail

      • NO_NAME

        public static final java.lang.String NO_NAME
        Indicator for a method parameter without an explicit name.
      • NO_MODIFIERS

        public static final java.lang.Integer NO_MODIFIERS
        Indicator for a method parameter without explicit modifiers.
      • annotations

        private final java.util.List<? extends AnnotationDescription> annotations
        A list of parameter annotations.
      • name

        private final java.lang.String name
        The name of the parameter or null if no explicit name is defined.
      • modifiers

        private final java.lang.Integer modifiers
        The modifiers of the parameter or null if no explicit modifiers is defined.
    • Constructor Detail

      • Token

        public Token​(TypeDescription.Generic type)
        Creates a new parameter token without an explicit name, an explicit modifier or annotations. The parameter type must be represented in its detached format.
        Parameters:
        type - The type of the represented parameter.
      • Token

        public Token​(TypeDescription.Generic type,
                     java.util.List<? extends AnnotationDescription> annotations)
        Creates a new parameter token without an explicit name or an explicit modifier. The parameter type must be represented in its detached format.
        Parameters:
        type - The type of the represented parameter.
        annotations - The annotations of the parameter.
      • Token

        public Token​(TypeDescription.Generic type,
                     java.lang.String name,
                     java.lang.Integer modifiers)
        Creates a parameter token without annotations. The parameter type must be represented in its detached format.
        Parameters:
        type - The type of the represented parameter.
        name - The name of the parameter or null if no explicit name is defined.
        modifiers - The modifiers of the parameter or null if no explicit modifiers is defined.
      • Token

        public Token​(TypeDescription.Generic type,
                     java.util.List<? extends AnnotationDescription> annotations,
                     java.lang.String name,
                     java.lang.Integer modifiers)
        Creates a new parameter token. The parameter type must be represented in its detached format.
        Parameters:
        type - The type of the represented parameter.
        annotations - The annotations of the parameter.
        name - The name of the parameter or null if no explicit name is defined.
        modifiers - The modifiers of the parameter or null if no explicit modifiers is defined.
    • Method Detail

      • getType

        public TypeDescription.Generic getType()
        Returns the type of the represented method parameter.
        Returns:
        The type of the represented method parameter.
      • getAnnotations

        public AnnotationList getAnnotations()
        Returns the annotations of the represented method parameter.
        Returns:
        The annotations of the represented method parameter.
      • getName

        public java.lang.String getName()
        Returns the name of the represented method parameter.
        Returns:
        The name of the parameter or null if no explicit name is defined.
      • getModifiers

        public java.lang.Integer getModifiers()
        Returns the modifiers of the represented method parameter.
        Returns:
        The modifiers of the parameter or null if no explicit modifiers is defined.
      • hashCode

        @Enhance("hashCode")
        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object