public class PropertyLoaderService extends java.lang.Object implements PropertyLoader
DEFAULT_PROPERTY_LOADER
Constructor and Description |
---|
PropertyLoaderService() |
Modifier and Type | Method and Description |
---|---|
java.util.Locale |
getLocale() |
PropertyLoaderProperties |
getProperties() |
<T> T |
getProperties(java.lang.Class<T> accessor)
Generate an implementing instance of the given accessor interface class,
according to the rules described by
Properties . |
<T> T |
getProperties(PropertyAccessorConfiguration<T> accessorConfiguration)
Generate an implementing instance of the given accessor interface class,
according to the rules described by
Properties . |
java.util.Set<java.lang.Class<? extends PropertyResourceStrategy<?>>> |
getResourceStrategies() |
<T extends PropertyResourceStrategy<T>> |
getResourceStrategy(java.lang.Class<T> strategy) |
java.util.Optional<PropertyValueProvider<?>> |
getValueProvider(java.lang.reflect.AnnotatedType type) |
java.util.List<PropertyValueProviderFactory> |
getValueProviders() |
ObservableValue<java.util.Locale> |
locale() |
<T extends PropertyResourceStrategy<T>> |
registerResourceStrategy(T strategy) |
boolean |
registerValueProvider(PropertyValueProviderFactory propertyProvider) |
<T extends PropertyResourceStrategy<T>> |
setDefaultResourceStrategy(T strategy) |
<T extends PropertyResourceStrategy<T>> |
unregisterResourceStrategy(T strategy) |
boolean |
unregisterValueProvider(PropertyValueProviderFactory propertyProvider) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefaultProperties, getDefaultProperties, getDefaultPropertyLoader, getPropertyLoader, getPropertyLoader
public java.util.Locale getLocale()
getLocale
in interface PropertyLoader
PropertyLoader
public ObservableValue<java.util.Locale> locale()
locale
in interface PropertyLoader
public boolean registerValueProvider(PropertyValueProviderFactory propertyProvider)
registerValueProvider
in interface PropertyLoader
propertyProvider
- a provider for a type of propertypublic boolean unregisterValueProvider(PropertyValueProviderFactory propertyProvider)
unregisterValueProvider
in interface PropertyLoader
propertyProvider
- a provider for a type of propertypublic java.util.List<PropertyValueProviderFactory> getValueProviders()
getValueProviders
in interface PropertyLoader
public java.util.Optional<PropertyValueProvider<?>> getValueProvider(java.lang.reflect.AnnotatedType type)
getValueProvider
in interface PropertyLoader
type
- the exact annotated type to providefactories
over the given typepublic <T extends PropertyResourceStrategy<T>> void setDefaultResourceStrategy(T strategy)
setDefaultResourceStrategy
in interface PropertyLoader
public <T extends PropertyResourceStrategy<T>> boolean registerResourceStrategy(T strategy)
registerResourceStrategy
in interface PropertyLoader
strategy
- the strategy to registerpublic <T extends PropertyResourceStrategy<T>> boolean unregisterResourceStrategy(T strategy)
unregisterResourceStrategy
in interface PropertyLoader
strategy
- the strategy to unregisterpublic java.util.Set<java.lang.Class<? extends PropertyResourceStrategy<?>>> getResourceStrategies()
getResourceStrategies
in interface PropertyLoader
public <T extends PropertyResourceStrategy<T>> T getResourceStrategy(java.lang.Class<T> strategy)
getResourceStrategy
in interface PropertyLoader
public <T> T getProperties(java.lang.Class<T> accessor)
PropertyLoader
Properties
.getProperties
in interface PropertyLoader
T
- the type of the localization text accessor interfaceaccessor
- the sub-interface of Properties
we wish to implementpublic <T> T getProperties(PropertyAccessorConfiguration<T> accessorConfiguration)
PropertyLoader
Properties
.getProperties
in interface PropertyLoader
T
- the type of the localization text accessor interfaceaccessorConfiguration
- configuration object for the sub-interface of Properties
we
wish to implement, and the default property configuration to applypublic PropertyLoaderProperties getProperties()
getProperties
in interface PropertyLoader