public interface ArgumentParserRegistry
ArgumentParsers| Modifier and Type | Method and Description |
|---|---|
default <T> Optional<ArgumentParser<T>> |
find(Class<T> clazz)
Tries to find an argument parser for the given class
|
<T> Optional<ArgumentParser<T>> |
find(com.google.common.reflect.TypeToken<T> type)
Tries to find an argument parser for the given type
|
default <T> Collection<ArgumentParser<T>> |
findAll(Class<T> clazz)
Finds all known parsers for a given class
|
<T> Collection<ArgumentParser<T>> |
findAll(com.google.common.reflect.TypeToken<T> type)
Finds all known parsers for a given type
|
default <T> void |
register(Class<T> clazz,
ArgumentParser<T> parser)
Registers a new parser with the registry
|
<T> void |
register(com.google.common.reflect.TypeToken<T> type,
ArgumentParser<T> parser)
Registers a new parser with the registry
|
@Nonnull <T> Optional<ArgumentParser<T>> find(@Nonnull com.google.common.reflect.TypeToken<T> type)
T - the typetype - the argument type@Nonnull default <T> Optional<ArgumentParser<T>> find(@Nonnull Class<T> clazz)
T - the class typeclazz - the argument class@Nonnull <T> Collection<ArgumentParser<T>> findAll(@Nonnull com.google.common.reflect.TypeToken<T> type)
T - the typetype - the argument type@Nonnull default <T> Collection<ArgumentParser<T>> findAll(@Nonnull Class<T> clazz)
T - the class typeclazz - the argument class<T> void register(@Nonnull com.google.common.reflect.TypeToken<T> type, @Nonnull ArgumentParser<T> parser)
T - the typetype - the argument typeparser - the parserdefault <T> void register(@Nonnull Class<T> clazz, @Nonnull ArgumentParser<T> parser)
T - the class typeclazz - the argument classparser - the parserCopyright © 2022. All rights reserved.