public class ConfigurationContext extends Object
GlobalContext). This instance is passed between the individual
context types created in the course of using the fluent API. The book-keeping of configured options is delegated to
OptionsContext.| Constructor and Description |
|---|
ConfigurationContext(OptionsContext globalContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntityOption(Option<?> option) |
void |
addGlobalOption(Option<?> option) |
void |
addPropertyOption(Option<?> option) |
void |
configureEntity(Class<?> entityType) |
void |
configureProperty(String propertyName,
ElementType elementType) |
<G extends GlobalContext<?,?>> |
createGlobalContext(Class<? extends G> globalContextImplType,
Class<? extends EntityContext<?,?>> entityContextImplType,
Class<? extends PropertyContext<?,?>> propertyContextImplType)
Creates a new
GlobalContext object based on the given context implementation types. |
public ConfigurationContext(OptionsContext globalContext)
public void addGlobalOption(Option<?> option)
public void addEntityOption(Option<?> option)
public void addPropertyOption(Option<?> option)
public void configureEntity(Class<?> entityType)
public void configureProperty(String propertyName, ElementType elementType)
public <G extends GlobalContext<?,?>> G createGlobalContext(Class<? extends G> globalContextImplType, Class<? extends EntityContext<?,?>> entityContextImplType, Class<? extends PropertyContext<?,?>> propertyContextImplType)
GlobalContext object based on the given context implementation types. All implementation
types must declare a public or protected constructor with a single parameter, accepting ConfigurationContext.
Each context implementation type must provide an implementation of the method(s) declared on the particular
provider-specific context interface. All methods declared on context super interfaces - entity() and
property() - are implemented following the dynamic proxy pattern, the implementation types therefore can
be declared abstract, avoiding the need to implement these methods themselves.
By convention, the implementation types should directly or indirectly extend BaseContext.
globalContextImplType - the provider-specific global context implementation typeentityContextImplType - the provider-specific entity context implementation typepropertyContextImplType - the provider-specific property context implementation typeGlobalContext object based on the given context implementation typesCopyright © 2010-2013 Red Hat, Inc., Emmanuel Bernard and various contributors. All Rights Reserved.