public class BridgeHeadTypeRegistry extends Object
BridgeFactory.| Constructor and Description |
|---|
BridgeHeadTypeRegistry(FactoryInjector injector)
Creates a new
BridgeHeadTypeRegistry instance. |
| Modifier and Type | Method and Description |
|---|---|
BridgeFactory |
getBridgeFactory(Class<?> farType)
Returns the bridge factory that corresponds to the given far type
|
Class<?> |
getFarType(Class<?> nearType)
Returns the far type that corresponds to the given near type.
|
boolean |
hasFarType(Class<?> farType)
Returns a flag that indicates whether the given class is registered as the far type of a
BridgeFactory. |
boolean |
hasNearType(Class<?> nearType)
Returns a flag that indicates whether the given class is registered as the near type of a
BridgeFactory. |
void |
injectInto(FactoryAccessor<?> accessor)
Inject the correct
BridgeFactory into the given
accessor. |
void |
register(BridgeFactory bridgeFactory)
Registers the given bridge factory and its bridge head types.
|
@Autowired public BridgeHeadTypeRegistry(FactoryInjector injector)
BridgeHeadTypeRegistry instance. The new instance makes itself known to
the given injector. This enables the injector to lazily provide
BridgeFactorys.
to newly created beans.injector - The injector to notifypublic void register(BridgeFactory bridgeFactory)
bridgeFactory - The bridge factory to registerpublic boolean hasNearType(Class<?> nearType)
BridgeFactory.nearType - The class to checktrue if the given class is registered as the near type of a bridge factory;
false otherwisepublic boolean hasFarType(Class<?> farType)
BridgeFactory.farType - The class to checktrue if the given class is registered as the far type of a bridge factory;
false otherwisepublic Class<?> getFarType(Class<?> nearType)
nearType - The near type to look upIllegalStateException - If the given near type is not registeredpublic BridgeFactory getBridgeFactory(Class<?> farType)
farType - The far type to look upIllegalStateException - If the given far type is not registeredpublic void injectInto(FactoryAccessor<?> accessor)
BridgeFactory into the given
accessor.accessor - The accessor to inject intoCopyright © 2013. All Rights Reserved.