-
- 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 ParameterMirrorwithDeclaringExecutable(ExecutableMirror enclosing)Returns a copy of this parameter with its enclosing method/constructor replaced with enclosing. abstract ParametergetJava()The Core Reflection object this mirror represents abstract ParameterMirrorgetRaw()The mirror representing this parameter without any generic specialization abstract BooleangetHasName()Whether the parameter has a name compiled in the class file abstract StringgetName()The name of this parameter. abstract IntegergetIndex()The index in the parameter list abstract BooleangetIsFinal()True if the finalmodifier is present on this parameterabstract BooleangetIsVarArgs()True if this is a vararg parameter abstract TypeMirrorgetType()The type of this parameter, specialized based on the declaring executable's specialization. abstract AnnotationListgetAnnotations()Returns annotations that are present on the member this mirror represents. abstract AnnotationListgetDeclaredAnnotations()Returns annotations that are declared on the member this mirror represents. abstract ExecutableMirrorgetDeclaringExecutable()The specialized executable this parameter is declared in -
-
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
-
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, whereNis the index of the argument.
-
getIsFinal
abstract Boolean getIsFinal()
True if the
finalmodifier is present on this parameter
-
getIsVarArgs
abstract Boolean getIsVarArgs()
True if this is a vararg parameter
-
getType
abstract TypeMirror getType()
The type of this parameter, specialized based on the declaring executable's specialization.
-
getAnnotations
abstract AnnotationList getAnnotations()
Returns annotations that are present on the member this mirror represents.
-
getDeclaredAnnotations
abstract AnnotationList getDeclaredAnnotations()
Returns annotations that are declared on the member this mirror represents.
-
getDeclaringExecutable
abstract ExecutableMirror getDeclaringExecutable()
The specialized executable this parameter is declared in
-
-
-
-