Package picocli
Class CommandLine.Model.TypedMember
- java.lang.Object
-
- picocli.CommandLine.Model.TypedMember
-
- All Implemented Interfaces:
CommandLine.Model.IAnnotatedElement,CommandLine.Model.IExtensible
- Enclosing class:
- CommandLine.Model
static class CommandLine.Model.TypedMember extends java.lang.Object implements CommandLine.Model.IAnnotatedElement, CommandLine.Model.IExtensible
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.reflect.AccessibleObjectaccessibleprivate CommandLine.Model.IGettergetterprivate CommandLine.Model.InitialValueStateinitialValueState(package private) java.lang.Stringnameprivate CommandLine.Model.IScopescopeprivate CommandLine.Model.ISettersetter(package private) CommandLine.Model.ITypeInfotypeInfo
-
Constructor Summary
Constructors Modifier Constructor Description (package private)TypedMember(java.lang.reflect.Field field)privateTypedMember(java.lang.reflect.Field field, CommandLine.Model.IScope scope)privateTypedMember(java.lang.reflect.Method method, CommandLine.Model.IScope scope, CommandLine.Model.CommandSpec spec)(package private)TypedMember(CommandLine.Model.MethodParam param, CommandLine.Model.IScope scope)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static java.lang.Stringabbreviate(java.lang.String text)private java.lang.Class<?>[]annotationTypes()(package private) static CommandLine.Model.TypedMembercreateIfAnnotated(java.lang.reflect.Field field, CommandLine.Model.IScope scope)(package private) static CommandLine.Model.TypedMembercreateIfAnnotated(java.lang.reflect.Method method, CommandLine.Model.IScope scope, CommandLine.Model.CommandSpec spec)private CommandLine.Model.ITypeInfocreateTypeInfo(java.lang.Class<?> type, java.lang.reflect.Type genericType)private static java.lang.Stringdecapitalize(java.lang.String name)<T extends java.lang.annotation.Annotation>
TgetAnnotation(java.lang.Class<T> annotationClass)java.lang.Class<?>[]getAuxiliaryTypes()<T> TgetExtension(java.lang.Class<T> cls)Returns an instance of the specified class, ornullif this extension is not supported.intgetMethodParamPosition()java.lang.StringgetMixinName()java.lang.StringgetName()CommandLine.Model.IGettergetter()java.lang.StringgetToString()java.lang.Class<?>getType()CommandLine.Model.ITypeInfogetTypeInfo()booleanhasInitialValue()private voidinitializeInitialValue(java.lang.Object arg)(package private) static booleanisAnnotated(java.lang.reflect.AnnotatedElement e)booleanisAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)booleanisArgGroup()booleanisArgSpec()booleanisInteractive()booleanisMethodParameter()booleanisMixin()booleanisMultiValue()booleanisOption()booleanisParameter()booleanisParentCommand()booleanisSpec()booleanisUnmatched()(package private) static java.lang.StringpropertyName(java.lang.String methodName)CommandLine.Model.IScopescope()CommandLine.Model.ISettersetter()java.lang.StringtoGenericString()java.lang.StringtoString()java.lang.ObjectuserObject()
-
-
-
Field Detail
-
accessible
final java.lang.reflect.AccessibleObject accessible
-
name
final java.lang.String name
-
typeInfo
final CommandLine.Model.ITypeInfo typeInfo
-
initialValueState
private final CommandLine.Model.InitialValueState initialValueState
-
scope
private CommandLine.Model.IScope scope
-
getter
private CommandLine.Model.IGetter getter
-
setter
private CommandLine.Model.ISetter setter
-
-
Constructor Detail
-
TypedMember
TypedMember(java.lang.reflect.Field field)
-
TypedMember
private TypedMember(java.lang.reflect.Field field, CommandLine.Model.IScope scope)
-
TypedMember
private TypedMember(java.lang.reflect.Method method, CommandLine.Model.IScope scope, CommandLine.Model.CommandSpec spec)
-
TypedMember
TypedMember(CommandLine.Model.MethodParam param, CommandLine.Model.IScope scope)
-
-
Method Detail
-
createIfAnnotated
static CommandLine.Model.TypedMember createIfAnnotated(java.lang.reflect.Field field, CommandLine.Model.IScope scope)
-
isAnnotated
static boolean isAnnotated(java.lang.reflect.AnnotatedElement e)
-
createIfAnnotated
static CommandLine.Model.TypedMember createIfAnnotated(java.lang.reflect.Method method, CommandLine.Model.IScope scope, CommandLine.Model.CommandSpec spec)
-
createTypeInfo
private CommandLine.Model.ITypeInfo createTypeInfo(java.lang.Class<?> type, java.lang.reflect.Type genericType)
-
initializeInitialValue
private void initializeInitialValue(java.lang.Object arg)
-
userObject
public java.lang.Object userObject()
- Specified by:
userObjectin interfaceCommandLine.Model.IAnnotatedElement
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
- Specified by:
isAnnotationPresentin interfaceCommandLine.Model.IAnnotatedElement
-
getAnnotation
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
- Specified by:
getAnnotationin interfaceCommandLine.Model.IAnnotatedElement
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceCommandLine.Model.IAnnotatedElement
-
isArgSpec
public boolean isArgSpec()
- Specified by:
isArgSpecin interfaceCommandLine.Model.IAnnotatedElement
-
isOption
public boolean isOption()
- Specified by:
isOptionin interfaceCommandLine.Model.IAnnotatedElement
-
isParameter
public boolean isParameter()
- Specified by:
isParameterin interfaceCommandLine.Model.IAnnotatedElement
-
isArgGroup
public boolean isArgGroup()
- Specified by:
isArgGroupin interfaceCommandLine.Model.IAnnotatedElement
-
isMixin
public boolean isMixin()
- Specified by:
isMixinin interfaceCommandLine.Model.IAnnotatedElement
-
isUnmatched
public boolean isUnmatched()
- Specified by:
isUnmatchedin interfaceCommandLine.Model.IAnnotatedElement
-
isSpec
public boolean isSpec()
- Specified by:
isSpecin interfaceCommandLine.Model.IAnnotatedElement
-
isParentCommand
public boolean isParentCommand()
- Specified by:
isParentCommandin interfaceCommandLine.Model.IAnnotatedElement
-
isMultiValue
public boolean isMultiValue()
- Specified by:
isMultiValuein interfaceCommandLine.Model.IAnnotatedElement
-
isInteractive
public boolean isInteractive()
- Specified by:
isInteractivein interfaceCommandLine.Model.IAnnotatedElement
-
scope
public CommandLine.Model.IScope scope()
- Specified by:
scopein interfaceCommandLine.Model.IAnnotatedElement
-
getter
public CommandLine.Model.IGetter getter()
- Specified by:
getterin interfaceCommandLine.Model.IAnnotatedElement
-
setter
public CommandLine.Model.ISetter setter()
- Specified by:
setterin interfaceCommandLine.Model.IAnnotatedElement
-
getTypeInfo
public CommandLine.Model.ITypeInfo getTypeInfo()
- Specified by:
getTypeInfoin interfaceCommandLine.Model.IAnnotatedElement
-
getType
public java.lang.Class<?> getType()
-
getAuxiliaryTypes
public java.lang.Class<?>[] getAuxiliaryTypes()
-
annotationTypes
private java.lang.Class<?>[] annotationTypes()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getToString
public java.lang.String getToString()
- Specified by:
getToStringin interfaceCommandLine.Model.IAnnotatedElement
-
toGenericString
public java.lang.String toGenericString()
-
hasInitialValue
public boolean hasInitialValue()
- Specified by:
hasInitialValuein interfaceCommandLine.Model.IAnnotatedElement
-
isMethodParameter
public boolean isMethodParameter()
- Specified by:
isMethodParameterin interfaceCommandLine.Model.IAnnotatedElement
-
getMethodParamPosition
public int getMethodParamPosition()
- Specified by:
getMethodParamPositionin interfaceCommandLine.Model.IAnnotatedElement
-
getMixinName
public java.lang.String getMixinName()
- Specified by:
getMixinNamein interfaceCommandLine.Model.IAnnotatedElement
-
propertyName
static java.lang.String propertyName(java.lang.String methodName)
-
decapitalize
private static java.lang.String decapitalize(java.lang.String name)
-
abbreviate
static java.lang.String abbreviate(java.lang.String text)
-
getExtension
public <T> T getExtension(java.lang.Class<T> cls)
Description copied from interface:CommandLine.Model.IExtensibleReturns an instance of the specified class, ornullif this extension is not supported.- Specified by:
getExtensionin interfaceCommandLine.Model.IExtensible- Parameters:
cls- class of the desired extension
-
-