public class GenericCommandBuilder extends Object
CommandBuilder based on a series of command factories for
all the methods present in that interface.| Constructor and Description |
|---|
GenericCommandBuilder() |
| Modifier and Type | Method and Description |
|---|---|
static <B extends CommandBuilder> |
createCommandBuilder(Class<B> commandBuilderInterface,
CommandInterface<? extends Command<?>>... commandFactories)
Returns a new command builder implementing the specified
commandBuilderInterface. |
static <B extends CommandBuilder> |
createCommandBuilder(Class<B> commandBuilderInterface,
DefaultCommandBuilder defaultCommandBuilder,
CommandInterface<? extends Command<?>>... commandFactories)
Returns a new command builder implementing the specified
commandBuilderInterface. |
public GenericCommandBuilder()
public static <B extends CommandBuilder> B createCommandBuilder(Class<B> commandBuilderInterface, CommandInterface<? extends Command<?>>... commandFactories)
commandBuilderInterface. The methods in that interface, if not
already implemented by DefaultCommandBuilder, must be present in
one of the given commandFactories with the same signature
returning a Command instance. If no factory is found for any of
the methods in the interface, an exception is thrown.B - the generic type of the builder interface to be implemented by
the returned buildercommandBuilderInterface - the class representing the builder interface to be implemented
by the returned buildercommandFactories - the factories containing a factory method for every command
method in the given builder interfaceIllegalArgumentException - if commandBuilderInterface is not an interface class,
if no factory method implementation exists for any of the
command methods defined by that interface or if multiple
ambiguous implementations existpublic static <B extends CommandBuilder> B createCommandBuilder(Class<B> commandBuilderInterface, DefaultCommandBuilder defaultCommandBuilder, CommandInterface<? extends Command<?>>... commandFactories)
commandBuilderInterface. The methods in that interface, if not
already implemented by the specified defaultCommandBuilder, must
be present in one of the given commandFactories with the same
signature returning a Command instance. If no factory is found
for any of the methods in the interface, an exception is thrown.B - the generic type of the builder interface to be implemented by
the returned buildercommandBuilderInterface - the class representing the builder interface to be implemented
by the returned builderdefaultCommandBuilder - the default builder with implementations for all non-command
specific methodscommandFactories - the factories containing a factory method for every command
method in the given builder interfaceIllegalArgumentException - if commandBuilderInterface is not an interface class,
if no factory method implementation exists for any of the
command methods defined by that interface or if multiple
ambiguous implementations existCopyright © 2025. All rights reserved.