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.Element
element
private CommandLine.Model.IGetter
getter
(package private) boolean
hasInitialValue
(package private) java.lang.String
name
(package private) int
position
private CommandLine.Model.ISetter
setter
(package private) CommandLine.Model.ITypeInfo
typeInfo
-
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.String
abbreviate(java.lang.String text)
private static java.lang.String
decapitalize(java.lang.String name)
(package private) static boolean
empty(java.lang.String str)
<T extends java.lang.annotation.Annotation>
TgetAnnotation(java.lang.Class<T> annotationClass)
<T> T
getExtension(java.lang.Class<T> cls)
Returns an instance of the specified class, ornull
if this extension is not supported.int
getMethodParamPosition()
java.lang.String
getMixinName()
java.lang.String
getName()
CommandLine.Model.IGetter
getter()
java.lang.String
getToString()
CommandLine.Model.ITypeInfo
getTypeInfo()
boolean
hasInitialValue()
(package private) static boolean
isAnnotated(javax.lang.model.element.Element e)
boolean
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
boolean
isArgGroup()
boolean
isArgSpec()
boolean
isInteractive()
boolean
isMethodParameter()
boolean
isMixin()
boolean
isMultiValue()
boolean
isOption()
boolean
isParameter()
boolean
isParentCommand()
boolean
isSpec()
boolean
isUnmatched()
(package private) static java.lang.String
propertyName(java.lang.String methodName)
CommandLine.Model.IScope
scope()
CommandLine.Model.ISetter
setter()
(package private) java.lang.String
toGenericString()
java.lang.String
toString()
java.lang.Object
userObject()
-
-
-
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:
userObject
in interfaceCommandLine.Model.IAnnotatedElement
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
- Specified by:
isAnnotationPresent
in interfaceCommandLine.Model.IAnnotatedElement
-
getAnnotation
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
- Specified by:
getAnnotation
in interfaceCommandLine.Model.IAnnotatedElement
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceCommandLine.Model.IAnnotatedElement
-
isArgSpec
public boolean isArgSpec()
- Specified by:
isArgSpec
in interfaceCommandLine.Model.IAnnotatedElement
-
isOption
public boolean isOption()
- Specified by:
isOption
in interfaceCommandLine.Model.IAnnotatedElement
-
isParameter
public boolean isParameter()
- Specified by:
isParameter
in interfaceCommandLine.Model.IAnnotatedElement
-
isArgGroup
public boolean isArgGroup()
- Specified by:
isArgGroup
in interfaceCommandLine.Model.IAnnotatedElement
-
isMixin
public boolean isMixin()
- Specified by:
isMixin
in interfaceCommandLine.Model.IAnnotatedElement
-
isUnmatched
public boolean isUnmatched()
- Specified by:
isUnmatched
in interfaceCommandLine.Model.IAnnotatedElement
-
isSpec
public boolean isSpec()
- Specified by:
isSpec
in interfaceCommandLine.Model.IAnnotatedElement
-
isParentCommand
public boolean isParentCommand()
- Specified by:
isParentCommand
in interfaceCommandLine.Model.IAnnotatedElement
-
isMultiValue
public boolean isMultiValue()
- Specified by:
isMultiValue
in interfaceCommandLine.Model.IAnnotatedElement
-
isInteractive
public boolean isInteractive()
- Specified by:
isInteractive
in interfaceCommandLine.Model.IAnnotatedElement
-
getTypeInfo
public CommandLine.Model.ITypeInfo getTypeInfo()
- Specified by:
getTypeInfo
in interfaceCommandLine.Model.IAnnotatedElement
-
getter
public CommandLine.Model.IGetter getter()
- Specified by:
getter
in interfaceCommandLine.Model.IAnnotatedElement
-
setter
public CommandLine.Model.ISetter setter()
- Specified by:
setter
in interfaceCommandLine.Model.IAnnotatedElement
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getToString
public java.lang.String getToString()
- Specified by:
getToString
in interfaceCommandLine.Model.IAnnotatedElement
-
toGenericString
java.lang.String toGenericString()
-
hasInitialValue
public boolean hasInitialValue()
- Specified by:
hasInitialValue
in interfaceCommandLine.Model.IAnnotatedElement
-
isMethodParameter
public boolean isMethodParameter()
- Specified by:
isMethodParameter
in interfaceCommandLine.Model.IAnnotatedElement
-
getMethodParamPosition
public int getMethodParamPosition()
- Specified by:
getMethodParamPosition
in interfaceCommandLine.Model.IAnnotatedElement
-
scope
public CommandLine.Model.IScope scope()
- Specified by:
scope
in interfaceCommandLine.Model.IAnnotatedElement
-
getMixinName
public java.lang.String getMixinName()
- Specified by:
getMixinName
in 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.IExtensible
Returns an instance of the specified class, ornull
if this extension is not supported.- Specified by:
getExtension
in interfaceCommandLine.Model.IExtensible
- Parameters:
cls
- class of the desired extension
-
-