Class AbstractRegistry.DefaultNameResolution
java.lang.Object
de.aristaflow.adept2.base.registry.AbstractRegistry.DefaultNameResolution
- All Implemented Interfaces:
NameResolution
- Enclosing class:
- AbstractRegistry
Default implementation for resolving service name and component types.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new default implementation for resolving service name and component types. -
Method Summary
Modifier and TypeMethodDescriptiongetComponentType(String instanceName) Returns the name of the component type of the designated component instance as used in configuration files.getFormattedSignature(Class<?>[] parameterTypes) Helper method for getting a string describing the parameter types as method signature for use in log messages and exceptions.getHierarchicalInstanceName(String componentType, String simpleName) Returns a hierarchical instance name containing the component type as well as the instance name.Gets the component type name and the simple instance name of the designated component instance at once.getSimpleInstanceName(String instanceName) Returns the simple name of the designated component instance as used in configuration files.
-
Constructor Details
-
DefaultNameResolution
public DefaultNameResolution()Creates a new default implementation for resolving service name and component types.
-
-
Method Details
-
getHierarchicalInstanceName
Description copied from interface:NameResolutionReturns a hierarchical instance name containing the component type as well as the instance name. The returned string resembles, for instance,/ProcessManager/PM1.- Specified by:
getHierarchicalInstanceNamein interfaceNameResolution- Parameters:
componentType- The type of the component to create the hierarchical name for.simpleName- The simple name of the component instance as defined in the configuration.- Returns:
- An instance name containing the component type and the simple component instance name.
-
getSimpleInstanceName
Description copied from interface:NameResolutionReturns the simple name of the designated component instance as used in configuration files.- Specified by:
getSimpleInstanceNamein interfaceNameResolution- Parameters:
instanceName- The hierarchical name of a component instance.- Returns:
- The simple name without the prepending type of the component instance.
-
getComponentType
Description copied from interface:NameResolutionReturns the name of the component type of the designated component instance as used in configuration files.- Specified by:
getComponentTypein interfaceNameResolution- Parameters:
instanceName- The hierarchical name of a component instance.- Returns:
- The name of the component type.
-
getNames
Description copied from interface:NameResolutionGets the component type name and the simple instance name of the designated component instance at once.- Specified by:
getNamesin interfaceNameResolution- Parameters:
instanceName- The hierarchical name of a component instance.- Returns:
- The name of the component type and the simple name of the designated component instance.
-
getFormattedSignature
Description copied from interface:NameResolutionHelper method for getting a string describing the parameter types as method signature for use in log messages and exceptions.- Specified by:
getFormattedSignaturein interfaceNameResolution- Parameters:
parameterTypes- All the parameter types of a method as instances ofClass.- Returns:
- A string describing the parameter types as method signature (concatenated and surrounded by parenthesis).
-