Class ObjectRegistryImpl<O extends java.lang.Enum<O>>
- java.lang.Object
-
- net.officefloor.frame.impl.execute.managedobject.ObjectRegistryImpl<O>
-
- All Implemented Interfaces:
ObjectRegistry<O>
public class ObjectRegistryImpl<O extends java.lang.Enum<O>> extends java.lang.Object implements ObjectRegistry<O>
Implementation of theObjectRegistry
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ObjectRegistryImpl(ManagedFunctionContainer managedFunction, ManagedObjectIndex[] dependencies)
Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getObject(int index)
Obtains the dependencyObject
by its index.java.lang.Object
getObject(O key)
Obtains the dependencyObject
for the dependency key.
-
-
-
Constructor Detail
-
ObjectRegistryImpl
public ObjectRegistryImpl(ManagedFunctionContainer managedFunction, ManagedObjectIndex[] dependencies)
Initiate.- Parameters:
managedFunction
-ManagedFunctionContainer
to obtain the coordinatingManagedObject
instances.dependencies
-ManagedObjectIndex
for the dependencies in the index order required.
-
-
Method Detail
-
getObject
public java.lang.Object getObject(O key)
Description copied from interface:ObjectRegistry
Obtains the dependencyObject
for the dependency key.- Specified by:
getObject
in interfaceObjectRegistry<O extends java.lang.Enum<O>>
- Parameters:
key
- Key identifying the dependencyObject
.- Returns:
- Dependency
Object
for the key.
-
getObject
public java.lang.Object getObject(int index)
Description copied from interface:ObjectRegistry
Obtains the dependency
Object
by its index.This enables a dynamic number of dependencies for the
ManagedObject
.- Specified by:
getObject
in interfaceObjectRegistry<O extends java.lang.Enum<O>>
- Parameters:
index
- Index identifying the dependencyObject
.- Returns:
- Dependency
Object
for the index.
-
-