Class TypedMember
- java.lang.Object
-
- picocli.codegen.annotation.processing.TypedMember
-
- All Implemented Interfaces:
CommandLine.Model.IAnnotatedElement,CommandLine.Model.IExtensible
class TypedMember extends java.lang.Object implements CommandLine.Model.IAnnotatedElement, CommandLine.Model.IExtensible
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javax.lang.model.element.Elementelementprivate CommandLine.Model.IGettergetter(package private) booleanhasInitialValue(package private) java.lang.Stringname(package private) intpositionprivate CommandLine.Model.ISettersetter(package private) CommandLine.Model.ITypeInfotypeInfo
-
Constructor Summary
Constructors Constructor Description TypedMember(javax.lang.model.element.ExecutableElement method, AbstractCommandSpecProcessor processor)TypedMember(javax.lang.model.element.VariableElement variable, int position)
-
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 static java.lang.Stringdecapitalize(java.lang.String name)(package private) static booleanempty(java.lang.String str)<T extends java.lang.annotation.Annotation>
TgetAnnotation(java.lang.Class<T> annotationClass)<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()CommandLine.Model.ITypeInfogetTypeInfo()booleanhasInitialValue()(package private) static booleanisAnnotated(javax.lang.model.element.Element 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()(package private) java.lang.StringtoGenericString()java.lang.StringtoString()java.lang.ObjectuserObject()
-
-
-
Field Detail
-
element
final javax.lang.model.element.Element element
-
name
final java.lang.String name
-
typeInfo
final CommandLine.Model.ITypeInfo typeInfo
-
hasInitialValue
final boolean hasInitialValue
-
position
final int position
-
getter
private CommandLine.Model.IGetter getter
-
setter
private CommandLine.Model.ISetter setter
-
-
Constructor Detail
-
TypedMember
TypedMember(javax.lang.model.element.VariableElement variable, int position)
-
TypedMember
TypedMember(javax.lang.model.element.ExecutableElement method, AbstractCommandSpecProcessor processor)
-
-
Method Detail
-
isAnnotated
static boolean isAnnotated(javax.lang.model.element.Element e)
-
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
-
getTypeInfo
public CommandLine.Model.ITypeInfo getTypeInfo()
- Specified by:
getTypeInfoin 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
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getToString
public java.lang.String getToString()
- Specified by:
getToStringin interfaceCommandLine.Model.IAnnotatedElement
-
toGenericString
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
-
scope
public CommandLine.Model.IScope scope()
- Specified by:
scopein 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)
-
empty
static boolean empty(java.lang.String str)
-
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
-
-