Package picocli
Class CommandLine.Model.CommandReflection
java.lang.Object
picocli.CommandLine.Model.CommandReflection
- Enclosing class:
CommandLine.Model
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
assertNoDuplicateAnnotations
(CommandLine.Model.TypedMember member, Class<? extends Annotation> myAnnotation, Class<? extends Annotation>... forbidden) private static CommandLine.Model.ArgSpec
buildArgForMember
(CommandLine.Model.IAnnotatedElement member, CommandLine.IFactory factory) private static CommandLine.Model.ArgGroupSpec
buildArgGroupForMember
(CommandLine.Model.IAnnotatedElement member, CommandLine.IFactory factory, CommandLine.Model.CommandSpec commandSpec) private static CommandLine.Model.CommandSpec
buildMixinForMember
(CommandLine.Model.IAnnotatedElement member, CommandLine.IFactory factory) private static CommandLine.Model.UnmatchedArgsBinding
(package private) static CommandLine.Model.ArgGroupSpec
extractArgGroupSpec
(CommandLine.Model.IAnnotatedElement member, CommandLine.IFactory factory, CommandLine.Model.CommandSpec commandSpec, boolean annotationsAreMandatory) (package private) static CommandLine.Model.CommandSpec
extractCommandSpec
(Object command, CommandLine.IFactory factory, boolean annotationsAreMandatory) private static boolean
initFromAnnotatedMembers
(CommandLine.Model.IScope scope, Class<?> cls, CommandLine.Model.CommandSpec receiver, CommandLine.Model.ArgGroupSpec.Builder groupBuilder, CommandLine.IFactory factory, CommandLine.Model.Predicate<CommandLine.Model.TypedMember> predicate) private static boolean
initFromAnnotatedTypedMembers
(CommandLine.Model.TypedMember member, CommandLine.Model.Predicate<CommandLine.Model.TypedMember> predicate, CommandLine.Model.CommandSpec commandSpec, CommandLine.Model.ArgGroupSpec.Builder groupBuilder, CommandLine.IFactory factory) private static boolean
initFromMethodParameters
(CommandLine.Model.IScope scope, Method method, CommandLine.Model.CommandSpec receiver, CommandLine.Model.ArgGroupSpec.Builder groupBuilder, CommandLine.IFactory factory) private static void
initMethodSubcommands
(Class<?> cls, CommandLine.Model.CommandSpec parent, CommandLine.IFactory factory) private static void
initSubcommands
(CommandLine.Command cmd, Class<?> cls, CommandLine.Model.CommandSpec parent, CommandLine.IFactory factory, Set<Class<?>> hierarchy) private static void
injectSpecIntoVersionProvider
(CommandLine.Model.CommandSpec result, CommandLine.Command cmd, CommandLine.IFactory factory) private static String
subcommandName
(Class<?> sub) private static void
validateArgGroupSpec
(CommandLine.Model.ArgGroupSpec result, boolean hasArgAnnotation, String className) private static void
private static void
validateCommandSpec
(CommandLine.Model.CommandSpec result, boolean hasCommandAnnotation, String commandClassName) private static void
-
Constructor Details
-
CommandReflection
private CommandReflection()
-
-
Method Details
-
extractArgGroupSpec
static CommandLine.Model.ArgGroupSpec extractArgGroupSpec(CommandLine.Model.IAnnotatedElement member, CommandLine.IFactory factory, CommandLine.Model.CommandSpec commandSpec, boolean annotationsAreMandatory) throws Exception - Throws:
Exception
-
extractCommandSpec
static CommandLine.Model.CommandSpec extractCommandSpec(Object command, CommandLine.IFactory factory, boolean annotationsAreMandatory) -
injectSpecIntoVersionProvider
private static void injectSpecIntoVersionProvider(CommandLine.Model.CommandSpec result, CommandLine.Command cmd, CommandLine.IFactory factory) -
initSubcommands
private static void initSubcommands(CommandLine.Command cmd, Class<?> cls, CommandLine.Model.CommandSpec parent, CommandLine.IFactory factory, Set<Class<?>> hierarchy) -
initMethodSubcommands
private static void initMethodSubcommands(Class<?> cls, CommandLine.Model.CommandSpec parent, CommandLine.IFactory factory) -
subcommandName
-
initFromAnnotatedMembers
private static boolean initFromAnnotatedMembers(CommandLine.Model.IScope scope, Class<?> cls, CommandLine.Model.CommandSpec receiver, CommandLine.Model.ArgGroupSpec.Builder groupBuilder, CommandLine.IFactory factory, CommandLine.Model.Predicate<CommandLine.Model.TypedMember> predicate) -
initFromAnnotatedTypedMembers
private static boolean initFromAnnotatedTypedMembers(CommandLine.Model.TypedMember member, CommandLine.Model.Predicate<CommandLine.Model.TypedMember> predicate, CommandLine.Model.CommandSpec commandSpec, CommandLine.Model.ArgGroupSpec.Builder groupBuilder, CommandLine.IFactory factory) -
initFromMethodParameters
private static boolean initFromMethodParameters(CommandLine.Model.IScope scope, Method method, CommandLine.Model.CommandSpec receiver, CommandLine.Model.ArgGroupSpec.Builder groupBuilder, CommandLine.IFactory factory) -
validateArgSpecMember
-
validateCommandSpec
private static void validateCommandSpec(CommandLine.Model.CommandSpec result, boolean hasCommandAnnotation, String commandClassName) -
validateArgGroupSpec
private static void validateArgGroupSpec(CommandLine.Model.ArgGroupSpec result, boolean hasArgAnnotation, String className) -
validateInjectSpec
-
assertNoDuplicateAnnotations
private static void assertNoDuplicateAnnotations(CommandLine.Model.TypedMember member, Class<? extends Annotation> myAnnotation, Class<? extends Annotation>... forbidden) -
buildMixinForMember
private static CommandLine.Model.CommandSpec buildMixinForMember(CommandLine.Model.IAnnotatedElement member, CommandLine.IFactory factory) -
buildArgForMember
private static CommandLine.Model.ArgSpec buildArgForMember(CommandLine.Model.IAnnotatedElement member, CommandLine.IFactory factory) -
buildArgGroupForMember
private static CommandLine.Model.ArgGroupSpec buildArgGroupForMember(CommandLine.Model.IAnnotatedElement member, CommandLine.IFactory factory, CommandLine.Model.CommandSpec commandSpec) -
buildUnmatchedForMember
private static CommandLine.Model.UnmatchedArgsBinding buildUnmatchedForMember(CommandLine.Model.IAnnotatedElement member)
-