Package redempt.ordinate.creation
Interface ComponentFactory<T>
- All Known Implementing Classes:
DefaultComponentFactory
public interface ComponentFactory<T>
-
Method Summary
Modifier and TypeMethodDescription<V> ArgumentComponent<T,
V> createArgument
(ArgType<T, V> type, String name) createBooleanFlag
(String... names) <V> ConstraintComponent<T,
V> createConstraint
(Constraint<T, V> constraint, Supplier<Integer> index, String name) <V> ConsumingArgumentComponent<T,
V> createConsumingArgument
(ArgType<T, V> type, boolean optional, ContextProvider<T, V> defaultValue, String name) <V> ContextComponent<T,
V> createContext
(ContextProvider<T, V> provider, String name) createDispatch
(CommandDispatcher<T> dispatcher) <V> FlagComponent<T,
V> createFlag
(String[] names, ArgType<T, V> type, ContextProvider<T, V> defaultValue) createLookupComponent
(List<Command<T>> commands) <V extends Number & Comparable<V>>
ConstraintParser<T,V> createNumberConstraintParser
(Function<String, V> parseNumber) <V> OptionalArgumentComponent<T,
V> createOptionalArgument
(ArgType<T, V> type, ContextProvider<T, V> defaultValue, String name) <V> VariableLengthArgumentComponent<T,
V> createVariableLengthArgument
(ArgType<T, V> type, boolean optional, String name)
-
Method Details
-
createArgument
-
createOptionalArgument
<V> OptionalArgumentComponent<T,V> createOptionalArgument(ArgType<T, V> type, ContextProvider<T, V> defaultValue, String name) -
createConsumingArgument
<V> ConsumingArgumentComponent<T,V> createConsumingArgument(ArgType<T, V> type, boolean optional, ContextProvider<T, V> defaultValue, String name) -
createVariableLengthArgument
<V> VariableLengthArgumentComponent<T,V> createVariableLengthArgument(ArgType<T, V> type, boolean optional, String name) -
createBooleanFlag
-
createFlag
<V> FlagComponent<T,V> createFlag(String[] names, ArgType<T, V> type, ContextProvider<T, V> defaultValue) -
createContext
-
createDispatch
-
createConstraint
<V> ConstraintComponent<T,V> createConstraint(Constraint<T, V> constraint, Supplier<Integer> index, String name) -
createLookupComponent
-
createNumberConstraintParser
<V extends Number & Comparable<V>> ConstraintParser<T,V> createNumberConstraintParser(Function<String, V> parseNumber)
-