public interface JavaConfigurationBuilder extends ConfigurationBuilder
which pushes additional type checks to class load
time. This allows Tint, Tang's static analysis tool, to detect a wide
range of runtime configuration errors at build time.
Modifier and Type | Method and Description |
---|---|
<T> JavaConfigurationBuilder |
bind(Class<T> iface,
Class<?> impl)
Bind named parameters, implementations or external constructors, depending
on the types of the classes passed in.
|
<T> JavaConfigurationBuilder |
bindConstructor(Class<T> c,
Class<? extends ExternalConstructor<? extends T>> v) |
<T> JavaConfigurationBuilder |
bindImplementation(Class<T> iface,
Class<? extends T> impl)
Binds the Class impl as the implementation of the interface iface.
|
<T> JavaConfigurationBuilder |
bindList(Class<? extends Name<List<T>>> iface,
List impl)
Binds a specfic list to a named parameter.
|
JavaConfigurationBuilder |
bindNamedParameter(Class<? extends Name<?>> name,
String value)
Set the value of a named parameter.
|
<T> JavaConfigurationBuilder |
bindNamedParameter(Class<? extends Name<T>> iface,
Class<? extends T> impl) |
<T> JavaConfigurationBuilder |
bindSetEntry(Class<? extends Name<Set<T>>> iface,
Class<? extends T> impl) |
<T> JavaConfigurationBuilder |
bindSetEntry(Class<? extends Name<Set<T>>> iface,
String value) |
addConfiguration, bind, bind, bindConstructor, bindList, bindList, bindSetEntry, bindSetEntry, bindSetEntry, bindSetEntry, build, classPrettyDefaultString, classPrettyDescriptionString, getClassHierarchy, registerLegacyConstructor, registerLegacyConstructor, registerLegacyConstructor
<T> JavaConfigurationBuilder bind(Class<T> iface, Class<?> impl) throws BindException
iface
- impl
- BindException
<T> JavaConfigurationBuilder bindImplementation(Class<T> iface, Class<? extends T> impl) throws BindException
T
- iface
- impl
- BindException
JavaConfigurationBuilder bindNamedParameter(Class<? extends Name<?>> name, String value) throws BindException
name
- The dummy class that serves as the name of this parameter.value
- A string representing the value of the parameter. Reef must know
how to parse the parameter's type.NameResolutionException
BindException
<T> JavaConfigurationBuilder bindNamedParameter(Class<? extends Name<T>> iface, Class<? extends T> impl) throws BindException
BindException
<T> JavaConfigurationBuilder bindConstructor(Class<T> c, Class<? extends ExternalConstructor<? extends T>> v) throws BindException
BindException
<T> JavaConfigurationBuilder bindSetEntry(Class<? extends Name<Set<T>>> iface, String value) throws BindException
BindException
<T> JavaConfigurationBuilder bindSetEntry(Class<? extends Name<Set<T>>> iface, Class<? extends T> impl) throws BindException
BindException
<T> JavaConfigurationBuilder bindList(Class<? extends Name<List<T>>> iface, List impl) throws BindException
T
- iface
- The target named parameter to be injected intoimpl
- A concrete listBindException
Copyright © 2015 The Apache Software Foundation. All rights reserved.