Package picocli
Class CommandLine.Model.MethodParam
- java.lang.Object
-
- java.lang.reflect.AccessibleObject
-
- picocli.CommandLine.Model.MethodParam
-
- All Implemented Interfaces:
AnnotatedElement
- Enclosing class:
- CommandLine.Model
public static class CommandLine.Model.MethodParam extends AccessibleObject
Command method parameter, similar to java.lang.reflect.Parameter (not available before Java 8).- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description MethodParam(Method method, int paramIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Annotation>
TgetAnnotation(Class<T> annotationClass)Annotation[]getDeclaredAnnotations()MethodgetDeclaringExecutable()StringgetName()TypegetParameterizedType()Class<?>getType()booleanisAccessible()voidsetAccessible(boolean flag)StringtoString()-
Methods inherited from class java.lang.reflect.AccessibleObject
canAccess, getAnnotations, getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType, isAnnotationPresent, setAccessible, trySetAccessible
-
-
-
-
Constructor Detail
-
MethodParam
public MethodParam(Method method, int paramIndex)
-
-
Method Detail
-
getParameterizedType
public Type getParameterizedType()
-
getName
public String getName()
-
getType
public Class<?> getType()
-
getDeclaringExecutable
public Method getDeclaringExecutable()
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
- Specified by:
getAnnotationin interfaceAnnotatedElement- Overrides:
getAnnotationin classAccessibleObject
-
getDeclaredAnnotations
public Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotationsin interfaceAnnotatedElement- Overrides:
getDeclaredAnnotationsin classAccessibleObject
-
setAccessible
public void setAccessible(boolean flag) throws SecurityException- Overrides:
setAccessiblein classAccessibleObject- Throws:
SecurityException
-
isAccessible
public boolean isAccessible() throws SecurityException- Overrides:
isAccessiblein classAccessibleObject- Throws:
SecurityException
-
-