- 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()
Method
getDeclaringExecutable()
String
getName()
Type
getParameterizedType()
Class<?>
getType()
boolean
isAccessible()
void
setAccessible(boolean flag)
String
toString()
-
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:
getAnnotation
in interfaceAnnotatedElement
- Overrides:
getAnnotation
in classAccessibleObject
-
getDeclaredAnnotations
public Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
in interfaceAnnotatedElement
- Overrides:
getDeclaredAnnotations
in classAccessibleObject
-
setAccessible
public void setAccessible(boolean flag) throws SecurityException
- Overrides:
setAccessible
in classAccessibleObject
- Throws:
SecurityException
-
isAccessible
public boolean isAccessible() throws SecurityException
- Overrides:
isAccessible
in classAccessibleObject
- Throws:
SecurityException
-
-