Package picocli

Class CommandLine.Model.MethodParam

  • All Implemented Interfaces:
    java.lang.reflect.AnnotatedElement
    Enclosing class:
    CommandLine.Model

    public static class CommandLine.Model.MethodParam
    extends java.lang.reflect.AccessibleObject
    Command method parameter, similar to java.lang.reflect.Parameter (not available before Java 8).
    Since:
    4.0
    • Constructor Summary

      Constructors 
      Constructor Description
      MethodParam​(java.lang.reflect.Method method, int paramIndex)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends java.lang.annotation.Annotation>
      T
      getAnnotation​(java.lang.Class<T> annotationClass)  
      java.lang.annotation.Annotation[] getDeclaredAnnotations()  
      java.lang.reflect.Method getDeclaringExecutable()  
      java.lang.String getName()  
      java.lang.reflect.Type getParameterizedType()  
      java.lang.Class<?> getType()  
      boolean isAccessible()  
      void setAccessible​(boolean flag)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.reflect.AccessibleObject

        canAccess, getAnnotations, getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType, isAnnotationPresent, setAccessible, trySetAccessible
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MethodParam

        public MethodParam​(java.lang.reflect.Method method,
                           int paramIndex)
    • Method Detail

      • getParameterizedType

        public java.lang.reflect.Type getParameterizedType()
      • getName

        public java.lang.String getName()
      • getType

        public java.lang.Class<?> getType()
      • getDeclaringExecutable

        public java.lang.reflect.Method getDeclaringExecutable()
      • getAnnotation

        public <T extends java.lang.annotation.Annotation> T getAnnotation​(java.lang.Class<T> annotationClass)
        Specified by:
        getAnnotation in interface java.lang.reflect.AnnotatedElement
        Overrides:
        getAnnotation in class java.lang.reflect.AccessibleObject
      • getDeclaredAnnotations

        public java.lang.annotation.Annotation[] getDeclaredAnnotations()
        Specified by:
        getDeclaredAnnotations in interface java.lang.reflect.AnnotatedElement
        Overrides:
        getDeclaredAnnotations in class java.lang.reflect.AccessibleObject
      • setAccessible

        public void setAccessible​(boolean flag)
                           throws java.lang.SecurityException
        Overrides:
        setAccessible in class java.lang.reflect.AccessibleObject
        Throws:
        java.lang.SecurityException
      • isAccessible

        public boolean isAccessible()
                             throws java.lang.SecurityException
        Overrides:
        isAccessible in class java.lang.reflect.AccessibleObject
        Throws:
        java.lang.SecurityException
      • toString

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