Package 

Interface ParameterMirror

  • All Implemented Interfaces:
    dev.thecodewarrior.mirror.util.DeclarationMirror

    
    public interface ParameterMirror
     implements DeclarationMirror
                        

    A mirror representing a method or constructor parameter

    • Method Summary

      Modifier and Type Method Description
      abstract ParameterMirror withDeclaringExecutable(ExecutableMirror enclosing) Returns a copy of this parameter with its enclosing method/constructor replaced with enclosing.
      abstract Parameter getJava() The Core Reflection object this mirror represents
      abstract ParameterMirror getRaw() The mirror representing this parameter without any generic specialization
      abstract Boolean getHasName() Whether the parameter has a name compiled in the class file
      abstract String getName() The name of this parameter.
      abstract Integer getIndex() The index in the parameter list
      abstract Boolean getIsFinal() True if the final modifier is present on this parameter
      abstract Boolean getIsVarArgs() True if this is a vararg parameter
      abstract TypeMirror getType() The type of this parameter, specialized based on the declaring executable's specialization.
      abstract AnnotationList getAnnotations() Returns annotations that are present on the member this mirror represents.
      abstract AnnotationList getDeclaredAnnotations() Returns annotations that are declared on the member this mirror represents.
      abstract ExecutableMirror getDeclaringExecutable() The specialized executable this parameter is declared in
      • Methods inherited from class dev.thecodewarrior.mirror.member.ParameterMirror

        toDeclarationString, toJavaDeclarationString, toKotlinDeclarationString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • withDeclaringExecutable

         abstract ParameterMirror withDeclaringExecutable(ExecutableMirror enclosing)

        Returns a copy of this parameter with its enclosing method/constructor replaced with enclosing. If the passed executable is null this method removes any enclosing executable specialization.

        Note: A new mirror is only created if none already exist with the required specialization

      • getJava

         abstract Parameter getJava()

        The Core Reflection object this mirror represents

      • getRaw

         abstract ParameterMirror getRaw()

        The mirror representing this parameter without any generic specialization

      • getHasName

         abstract Boolean getHasName()

        Whether the parameter has a name compiled in the class file

      • getName

         abstract String getName()

        The name of this parameter. If no name is present, parameters are named argN, where N is the index of the argument.

      • getIsFinal

         abstract Boolean getIsFinal()

        True if the final modifier is present on this parameter

      • getType

         abstract TypeMirror getType()

        The type of this parameter, specialized based on the declaring executable's specialization.