Class ComponentSuffixGenerator


  • public class ComponentSuffixGenerator
    extends Object
    Utility class that maintains stacked counters which can be used as suffixes for uniquely identifying names.
    • Constructor Detail

      • ComponentSuffixGenerator

        public ComponentSuffixGenerator()
    • Method Detail

      • getSuffix

        public String getSuffix​(String componentName)
        Gets the suffix for a component name. The suffix scheme is to use an incrementing counter.
        Parameters:
        componentName - The name of the component the suffix for which is desired
        Returns:
        The suffix that uniquely identifies the component. If the api is consecutively called for the same component name, an incremented suffix value will be observed.
      • startComponentStack

        public void startComponentStack()
        Creates a new component stack for hierarchical suffixing. Same component names may bear the same suffix given that they are in different hierarchy levels
      • endComponentStack

        public void endComponentStack()
        Ends a component stack
      • reset

        public void reset()
        Resets the internal structures for maintaining the component stacks and suffixes