public interface IOperatorRegistry
ArrayLists of Classes
for
names
IOperatorDescriptor
IOperator
IOperatorGUI
IOperatorValidator
The list of names contains the indices of all other lists'
elements corresponding to the specified unique operator name.
E.g. if "Operator1" is added to the registry at index position 0, the
IOperatorDescriptor of "Operator1" goes to the index position 0 of
the IOperatorDescriptor list, and so on.
If a specific implementation’s class name is required, any instance can look
up the class name e.g. of an operator’s descriptor in the
OperatorRegistry using
OperatorRegistry.getInstance().getDescriptor(String).
| Modifier and Type | Method and Description |
|---|---|
Class<IOperatorDescriptor> |
getDescriptor(String name)
Gets the descriptor of an operator by name.
|
List<String> |
getNames()
Gets the list of registered names from the registry.
|
Class<IOperator> |
getOperator(String name)
Gets an operator by name.
|
Class<IOperatorGUI> |
getOperatorGUI(String name)
Gets the GUI of an operator by name.
|
Class<IOperatorValidator> |
getOperatorValidator(String name)
Gets the validator of an operator by name.
|
StackProcessingType |
getStackProcessingType(String name)
Gets the
StackProcessingType of an operator by name. |
OperatorType |
getType(String name)
Gets the type of an operator by name.
|
boolean |
isRegistered(String name)
Checks whether or not a given name is registered with this registry
|
void |
register(String name,
Class opDesc,
Class op,
Class opGUI,
Class opVal,
OperatorType type,
StackProcessingType stackProcessingType)
Adds a new operator to the registry using the unique name associated with
the
IOperatorDescriptor. |
void |
unRegister(String name)
Removes an operator from the registry using the unique name.
|
void |
updateRegistryEntry(String name)
Updates a registry entry and re-registers the
IOperatorDescriptor
with the same name in the registry. |
void register(String name, Class opDesc, Class op, Class opGUI, Class opVal, OperatorType type, StackProcessingType stackProcessingType)
IOperatorDescriptor.name - opDesc - op - opGUI - opVal - type - stackProcessingType - void unRegister(String name) throws NoSuchElementException
name - NoSuchElementException - if the provided name is not found in the registryClass<IOperatorDescriptor> getDescriptor(String name) throws NoSuchElementException
name - the operator nameClass of the descriptorNoSuchElementException - if the provided name is not found in the registryClass<IOperator> getOperator(String name) throws NoSuchElementException
name - the operator nameClass of the operatorNoSuchElementException - if the provided name is not found in the registryClass<IOperatorGUI> getOperatorGUI(String name) throws NoSuchElementException
name - the name of the operatorClass of the operator GUINoSuchElementException - if the provided name is not found in the registryClass<IOperatorValidator> getOperatorValidator(String name) throws NoSuchElementException
name - the name of the operatorClass of the operator validatorNoSuchElementException - if the provided name is not found in the registryOperatorType getType(String name)
name - OperatorTypeStackProcessingType getStackProcessingType(String name)
StackProcessingType of an operator by name.name - StackProcessingTypeList<String> getNames()
List of operator namesvoid updateRegistryEntry(String name) throws NoSuchElementException
IOperatorDescriptor
with the same name in the registry.name - the operator nameNoSuchElementExceptionboolean isRegistered(String name)
name - the operator nametrue, if the name is registered, false,
if notCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.