public class SimpleParserRegistry extends Object implements ArgumentParserRegistry
| Constructor and Description |
|---|
SimpleParserRegistry() |
| Modifier and Type | Method and Description |
|---|---|
<T> Optional<ArgumentParser<T>> |
find(com.google.common.reflect.TypeToken<T> type)
Tries to find an argument parser for the given type
|
<T> Collection<ArgumentParser<T>> |
findAll(com.google.common.reflect.TypeToken<T> type)
Finds all known parsers for a given type
|
<T> void |
register(com.google.common.reflect.TypeToken<T> type,
ArgumentParser<T> parser)
Registers a new parser with the registry
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfind, findAll, register@Nonnull public <T> Optional<ArgumentParser<T>> find(@Nonnull com.google.common.reflect.TypeToken<T> type)
ArgumentParserRegistryfind in interface ArgumentParserRegistryT - the typetype - the argument type@Nonnull public <T> Collection<ArgumentParser<T>> findAll(@Nonnull com.google.common.reflect.TypeToken<T> type)
ArgumentParserRegistryfindAll in interface ArgumentParserRegistryT - the typetype - the argument typepublic <T> void register(@Nonnull com.google.common.reflect.TypeToken<T> type, @Nonnull ArgumentParser<T> parser)
ArgumentParserRegistryregister in interface ArgumentParserRegistryT - the typetype - the argument typeparser - the parserCopyright © 2022. All rights reserved.