Class AbstractRegistry.DefaultNameResolution

java.lang.Object
de.aristaflow.adept2.base.registry.AbstractRegistry.DefaultNameResolution
All Implemented Interfaces:
NameResolution
Enclosing class:
AbstractRegistry

public static class AbstractRegistry.DefaultNameResolution extends Object implements NameResolution
Default implementation for resolving service name and component types.
  • Constructor Details

    • DefaultNameResolution

      public DefaultNameResolution()
      Creates a new default implementation for resolving service name and component types.
  • Method Details

    • getHierarchicalInstanceName

      public String getHierarchicalInstanceName(String componentType, String simpleName)
      Description copied from interface: NameResolution
      Returns a hierarchical instance name containing the component type as well as the instance name. The returned string resembles, for instance, /ProcessManager/PM1.
      Specified by:
      getHierarchicalInstanceName in interface NameResolution
      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

      public String getSimpleInstanceName(String instanceName)
      Description copied from interface: NameResolution
      Returns the simple name of the designated component instance as used in configuration files.
      Specified by:
      getSimpleInstanceName in interface NameResolution
      Parameters:
      instanceName - The hierarchical name of a component instance.
      Returns:
      The simple name without the prepending type of the component instance.
    • getComponentType

      public String getComponentType(String instanceName)
      Description copied from interface: NameResolution
      Returns the name of the component type of the designated component instance as used in configuration files.
      Specified by:
      getComponentType in interface NameResolution
      Parameters:
      instanceName - The hierarchical name of a component instance.
      Returns:
      The name of the component type.
    • getNames

      public Pair<String,String> getNames(String instanceName)
      Description copied from interface: NameResolution
      Gets the component type name and the simple instance name of the designated component instance at once.
      Specified by:
      getNames in interface NameResolution
      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

      public String getFormattedSignature(Class<?>[] parameterTypes)
      Description copied from interface: NameResolution
      Helper method for getting a string describing the parameter types as method signature for use in log messages and exceptions.
      Specified by:
      getFormattedSignature in interface NameResolution
      Parameters:
      parameterTypes - All the parameter types of a method as instances of Class.
      Returns:
      A string describing the parameter types as method signature (concatenated and surrounded by parenthesis).