T
- Config type.public interface ConfigView<T>
A config class may implement extra state and accessors beyond the bare Config. ConfigViews provides domain-specific accessors to Config values.
ConfigViews should be defined following this pattern.
@BuckStyleValue abstract class FooConfigView implements ConfigViewConfig views should also not declare any additional non-derived immutable fields if it's to be used with{ // Additional accessors. static FooConfigView of(T delegate) { return ImmutableFooConfigView.of(delegate); } }
ConfigViewCache
. As the cache assumes one-to-one correspondence with the main
config instance, it uses the generated factory FooConfigView.of(T delegate)
to
instantiate the view.Modifier and Type | Method and Description |
---|---|
T |
getDelegate() |
T getDelegate()