public final class Configurables
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T> com.google.common.reflect.TypeToken<OptionAccessor<T>> |
accessorOf(java.lang.Class<T> type) |
static <T> com.google.common.reflect.TypeToken<OptionAccessor<T>> |
accessorOf(com.google.common.reflect.TypeToken<T> type) |
static java.util.List<OptionAccessor<?>> |
accessors(java.lang.Class<?> schema) |
static <T> java.util.List<OptionAccessor<T>> |
accessors(java.lang.Class<?> schema,
java.lang.Class<T> type) |
static <T> java.util.List<OptionAccessor<T>> |
accessors(java.lang.Class<?> schema,
com.google.common.reflect.TypeToken<T> type) |
static Options |
compound(java.lang.Iterable<? extends Options> options) |
static Options |
compound(Options primary,
Options secondary) |
static Options |
compound(Options primary,
Options secondary,
Options... rest) |
static java.util.Map<java.lang.String,java.lang.Object> |
customRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions,
java.util.Map<java.lang.String,java.lang.Object> parentRawOptions) |
static java.util.Map<java.lang.String,java.lang.Object> |
customRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions,
java.util.Map<java.lang.String,java.lang.Object> parentRawOptions,
com.google.common.base.Equivalence<java.lang.String> keyEquivalence,
com.google.common.base.Equivalence<java.lang.Object> valueEquivalence) |
static MapOptions |
defaults(java.lang.Class<?> schema) |
static MapOptions |
defaults(java.lang.Class<?> schema,
java.lang.Class<?> type) |
static MapOptions |
defaults(java.lang.Class<?> schema,
com.google.common.reflect.TypeToken<?> type) |
static MapOptions |
defaults(java.lang.Iterable<? extends OptionMapping<?>> mappings) |
static MapOptions |
emptyOptions() |
static Options |
fromMap(java.util.Map<java.lang.String,java.lang.Object> map) |
static java.util.Map<java.lang.String,java.lang.Object> |
inheritedRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions,
java.util.Map<java.lang.String,java.lang.Object> parentRawOptions) |
static java.util.Map<java.lang.String,java.lang.Object> |
inheritedRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions,
java.util.Map<java.lang.String,java.lang.Object> parentRawOptions,
com.google.common.base.Equivalence<java.lang.String> keyEquivalence,
com.google.common.base.Equivalence<java.lang.Object> valueEquivalence) |
static java.util.Map<java.lang.String,java.lang.Object> |
knownRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions,
java.lang.Iterable<java.lang.String> knownKeys) |
static java.util.Map<java.lang.String,java.lang.Object> |
knownRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions,
java.lang.Iterable<java.lang.String> knownKeys,
com.google.common.base.Equivalence<java.lang.String> keyEquivalence) |
static <M extends OptionMapping<T>,T> |
mappingFunction(com.google.common.reflect.TypeToken<? extends M> map,
java.lang.Class<T> type) |
static <M extends OptionMapping<T>,T> |
mappingFunction(com.google.common.reflect.TypeToken<? extends M> map,
com.google.common.reflect.TypeToken<T> type) |
static <T> com.google.common.reflect.TypeToken<OptionMapping<T>> |
mappingOf(java.lang.Class<T> type) |
static <T> com.google.common.reflect.TypeToken<OptionMapping<T>> |
mappingOf(com.google.common.reflect.TypeToken<T> type) |
static java.util.List<OptionMapping<?>> |
mappings(java.lang.Class<?> schema) |
static <T> java.util.List<OptionMapping<T>> |
mappings(java.lang.Class<?> schema,
java.lang.Class<T> type) |
static <M extends OptionMapping<?>> |
mappings(java.lang.Class<?> schema,
com.google.common.base.Function<? super OptionMapping<?>,com.google.common.base.Optional<M>> function) |
static <T> java.util.List<OptionMapping<T>> |
mappings(java.lang.Class<?> schema,
com.google.common.reflect.TypeToken<T> type) |
static OptionsReader |
newReader(Options options) |
static OptionsWriter |
newWriter(Options options) |
static <T> OptionAccessor<T> |
option(OptionParser<? extends T> parser,
OptionMapping<T> mapping) |
static <T> OptionAccessor<T> |
option(OptionParser<T> parser,
java.lang.String key) |
static <T> OptionAccessor<T> |
option(OptionParser<T> parser,
java.lang.String key,
T defaultValue) |
static <T> OptionAccessor<T> |
option(com.google.common.reflect.TypeToken<T> type,
OptionParser<? extends T> parser,
java.lang.String key) |
static <T> OptionAccessor<T> |
option(com.google.common.reflect.TypeToken<T> type,
OptionParser<? extends T> parser,
java.lang.String key,
T defaultValue) |
static <T> OptionMapping<T> |
option(com.google.common.reflect.TypeToken<T> type,
java.lang.String key) |
static <T> OptionMapping<T> |
option(com.google.common.reflect.TypeToken<T> type,
java.lang.String key,
T defaultValue) |
static <E extends java.util.Map.Entry<java.lang.String,java.lang.Object>> |
optionEquivalence() |
static com.google.common.base.Equivalence<java.lang.String> |
optionKeyEquivalence() |
static <T> com.google.common.base.Equivalence<T> |
optionValueEquivalence() |
static com.google.common.reflect.TypeToken<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
rawOptionType() |
static <M extends java.util.Map<java.lang.String,java.lang.Object>> |
rawValues(java.lang.Iterable<? extends OptionAccessor<?>> accessors,
Options source,
M destination) |
static <M extends java.util.Map<java.lang.String,java.lang.Object>> |
rawValues(java.lang.Iterable<? extends OptionAccessor<?>> accessors,
OptionsReader source,
M destination) |
static <M extends java.util.Map<java.lang.String,java.lang.Object>> |
rawValues(java.lang.Iterable<? extends OptionAccessor<?>> accessors,
OptionsReader source,
com.google.common.base.Supplier<? extends M> destination) |
static <M extends java.util.Map<java.lang.String,java.lang.Object>> |
rawValues(java.lang.Iterable<? extends OptionAccessor<?>> accessors,
Options source,
com.google.common.base.Supplier<? extends M> destination) |
static java.util.Map<java.lang.String,java.lang.Object> |
toMap(Options options) |
static java.util.Map<java.lang.String,java.lang.Object> |
unknownRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions,
java.lang.Iterable<java.lang.String> knownKeys) |
static java.util.Map<java.lang.String,java.lang.Object> |
unknownRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions,
java.lang.Iterable<java.lang.String> knownKeys,
com.google.common.base.Equivalence<java.lang.String> keyEquivalence) |
static <M extends java.util.Map<java.lang.String,java.lang.Object>> |
values(java.lang.Iterable<? extends OptionAccessor<?>> accessors,
Options source,
M destination) |
static <M extends java.util.Map<java.lang.String,java.lang.Object>> |
values(java.lang.Iterable<? extends OptionAccessor<?>> accessors,
OptionsReader source,
M destination) |
static <M extends java.util.Map<java.lang.String,java.lang.Object>> |
values(java.lang.Iterable<? extends OptionAccessor<?>> accessors,
OptionsReader source,
com.google.common.base.Supplier<? extends M> destination) |
static <M extends java.util.Map<java.lang.String,java.lang.Object>> |
values(java.lang.Iterable<? extends OptionAccessor<?>> accessors,
Options source,
com.google.common.base.Supplier<? extends M> destination) |
static com.google.common.reflect.TypeToken<OptionAccessor<?>> |
wildcardAccessorType() |
static com.google.common.reflect.TypeToken<OptionMapping<?>> |
wildcardMappingType() |
public static MapOptions defaults(java.lang.Class<?> schema)
public static MapOptions defaults(java.lang.Class<?> schema, java.lang.Class<?> type)
public static MapOptions defaults(java.lang.Class<?> schema, com.google.common.reflect.TypeToken<?> type)
public static MapOptions defaults(java.lang.Iterable<? extends OptionMapping<?>> mappings)
public static java.util.List<OptionMapping<?>> mappings(java.lang.Class<?> schema)
public static <T> java.util.List<OptionMapping<T>> mappings(java.lang.Class<?> schema, java.lang.Class<T> type)
public static <T> java.util.List<OptionMapping<T>> mappings(java.lang.Class<?> schema, com.google.common.reflect.TypeToken<T> type)
public static <M extends OptionMapping<?>> java.util.List<M> mappings(java.lang.Class<?> schema, com.google.common.base.Function<? super OptionMapping<?>,com.google.common.base.Optional<M>> function)
public static java.util.List<OptionAccessor<?>> accessors(java.lang.Class<?> schema)
public static <T> java.util.List<OptionAccessor<T>> accessors(java.lang.Class<?> schema, java.lang.Class<T> type)
public static <T> java.util.List<OptionAccessor<T>> accessors(java.lang.Class<?> schema, com.google.common.reflect.TypeToken<T> type)
public static <M extends OptionMapping<T>,T> com.google.common.base.Function<OptionMapping<?>,com.google.common.base.Optional<M>> mappingFunction(com.google.common.reflect.TypeToken<? extends M> map, java.lang.Class<T> type)
public static <M extends OptionMapping<T>,T> com.google.common.base.Function<OptionMapping<?>,com.google.common.base.Optional<M>> mappingFunction(com.google.common.reflect.TypeToken<? extends M> map, com.google.common.reflect.TypeToken<T> type)
public static <M extends java.util.Map<java.lang.String,java.lang.Object>> M values(java.lang.Iterable<? extends OptionAccessor<?>> accessors, Options source, M destination)
public static <M extends java.util.Map<java.lang.String,java.lang.Object>> M values(java.lang.Iterable<? extends OptionAccessor<?>> accessors, Options source, com.google.common.base.Supplier<? extends M> destination)
public static <M extends java.util.Map<java.lang.String,java.lang.Object>> M values(java.lang.Iterable<? extends OptionAccessor<?>> accessors, OptionsReader source, M destination)
public static <M extends java.util.Map<java.lang.String,java.lang.Object>> M values(java.lang.Iterable<? extends OptionAccessor<?>> accessors, OptionsReader source, com.google.common.base.Supplier<? extends M> destination)
public static <M extends java.util.Map<java.lang.String,java.lang.Object>> M rawValues(java.lang.Iterable<? extends OptionAccessor<?>> accessors, Options source, M destination)
public static <M extends java.util.Map<java.lang.String,java.lang.Object>> M rawValues(java.lang.Iterable<? extends OptionAccessor<?>> accessors, Options source, com.google.common.base.Supplier<? extends M> destination)
public static <M extends java.util.Map<java.lang.String,java.lang.Object>> M rawValues(java.lang.Iterable<? extends OptionAccessor<?>> accessors, OptionsReader source, M destination)
public static <M extends java.util.Map<java.lang.String,java.lang.Object>> M rawValues(java.lang.Iterable<? extends OptionAccessor<?>> accessors, OptionsReader source, com.google.common.base.Supplier<? extends M> destination)
public static <T> OptionMapping<T> option(com.google.common.reflect.TypeToken<T> type, java.lang.String key)
public static <T> OptionMapping<T> option(com.google.common.reflect.TypeToken<T> type, java.lang.String key, @Nullable T defaultValue)
public static <T> OptionAccessor<T> option(OptionParser<T> parser, java.lang.String key)
public static <T> OptionAccessor<T> option(OptionParser<T> parser, java.lang.String key, @Nullable T defaultValue)
public static <T> OptionAccessor<T> option(OptionParser<? extends T> parser, OptionMapping<T> mapping)
public static <T> OptionAccessor<T> option(com.google.common.reflect.TypeToken<T> type, OptionParser<? extends T> parser, java.lang.String key)
public static <T> OptionAccessor<T> option(com.google.common.reflect.TypeToken<T> type, OptionParser<? extends T> parser, java.lang.String key, @Nullable T defaultValue)
public static <E extends java.util.Map.Entry<java.lang.String,java.lang.Object>> com.google.common.base.Equivalence<E> optionEquivalence()
public static com.google.common.base.Equivalence<java.lang.String> optionKeyEquivalence()
public static <T> com.google.common.base.Equivalence<T> optionValueEquivalence()
public static OptionsReader newReader(Options options)
public static OptionsWriter newWriter(Options options)
public static MapOptions emptyOptions()
public static Options fromMap(@Nullable java.util.Map<java.lang.String,java.lang.Object> map)
public static java.util.Map<java.lang.String,java.lang.Object> toMap(@Nullable Options options)
public static java.util.Map<java.lang.String,java.lang.Object> knownRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions, java.lang.Iterable<java.lang.String> knownKeys)
public static java.util.Map<java.lang.String,java.lang.Object> knownRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions, java.lang.Iterable<java.lang.String> knownKeys, com.google.common.base.Equivalence<java.lang.String> keyEquivalence)
public static java.util.Map<java.lang.String,java.lang.Object> unknownRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions, java.lang.Iterable<java.lang.String> knownKeys)
public static java.util.Map<java.lang.String,java.lang.Object> unknownRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions, java.lang.Iterable<java.lang.String> knownKeys, com.google.common.base.Equivalence<java.lang.String> keyEquivalence)
public static java.util.Map<java.lang.String,java.lang.Object> inheritedRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions, java.util.Map<java.lang.String,java.lang.Object> parentRawOptions)
public static java.util.Map<java.lang.String,java.lang.Object> inheritedRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions, java.util.Map<java.lang.String,java.lang.Object> parentRawOptions, com.google.common.base.Equivalence<java.lang.String> keyEquivalence, com.google.common.base.Equivalence<java.lang.Object> valueEquivalence)
public static java.util.Map<java.lang.String,java.lang.Object> customRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions, java.util.Map<java.lang.String,java.lang.Object> parentRawOptions)
public static java.util.Map<java.lang.String,java.lang.Object> customRawOptions(java.util.Map<java.lang.String,java.lang.Object> rawOptions, java.util.Map<java.lang.String,java.lang.Object> parentRawOptions, com.google.common.base.Equivalence<java.lang.String> keyEquivalence, com.google.common.base.Equivalence<java.lang.Object> valueEquivalence)
public static <T> com.google.common.reflect.TypeToken<OptionMapping<T>> mappingOf(java.lang.Class<T> type)
public static <T> com.google.common.reflect.TypeToken<OptionMapping<T>> mappingOf(com.google.common.reflect.TypeToken<T> type)
public static <T> com.google.common.reflect.TypeToken<OptionAccessor<T>> accessorOf(java.lang.Class<T> type)
public static <T> com.google.common.reflect.TypeToken<OptionAccessor<T>> accessorOf(com.google.common.reflect.TypeToken<T> type)
public static com.google.common.reflect.TypeToken<java.util.Map.Entry<java.lang.String,java.lang.Object>> rawOptionType()
public static com.google.common.reflect.TypeToken<OptionMapping<?>> wildcardMappingType()
public static com.google.common.reflect.TypeToken<OptionAccessor<?>> wildcardAccessorType()