Class UniqueNameNormalizer

  • All Implemented Interfaces:
    ch.uzh.ifi.seal.changedistiller.model.entities.IUniqueNameNormalizer

    public class UniqueNameNormalizer
    extends Object
    implements ch.uzh.ifi.seal.changedistiller.model.entities.IUniqueNameNormalizer

    UniqueNameNormalizer class.

    • Method Detail

      • addStrings

        public final void addStrings​(Collection<String> _class_names)

        addStrings.

        Parameters:
        _class_names - a Collection object.
      • addStrings

        public final void addStrings​(String[] _class_names)

        addStrings.

        Parameters:
        _class_names - an array of String objects.
      • haveEqualUniqueName

        public boolean haveEqualUniqueName​(ch.uzh.ifi.seal.changedistiller.model.entities.SourceCodeEntity _e1,
                                           ch.uzh.ifi.seal.changedistiller.model.entities.SourceCodeEntity _e2)
        Specified by:
        haveEqualUniqueName in interface ch.uzh.ifi.seal.changedistiller.model.entities.IUniqueNameNormalizer
      • normalizeUniqueName

        public String normalizeUniqueName​(String _string)
        Applies changes that are independent of a given EntityType to the given String. In more detail, the string is trimmed, occurrences of "this." are removed and constants are inlined.
        Parameters:
        _string - a String object.
        Returns:
        a String object.
      • normalizeUniqueName

        public String normalizeUniqueName​(ch.uzh.ifi.seal.changedistiller.model.entities.SourceCodeEntity _entity)
        Applies changes to the unique name of the given SourceCodeEntity, potentially dependent on its specific EntityType.
        Specified by:
        normalizeUniqueName in interface ch.uzh.ifi.seal.changedistiller.model.entities.IUniqueNameNormalizer
      • removeLeadingClassName

        public String removeLeadingClassName​(String _string)

        removeLeadingClassName.

        Parameters:
        _string - a String object.
        Returns:
        a String object.
      • removeNumberCasts

        public String removeNumberCasts​(String _string)

        removeNumberCasts.

        Parameters:
        _string - a String object.
        Returns:
        a String object.
      • inlineConstants

        public String inlineConstants​(String _string)

        inlineConstants.

        Parameters:
        _string - a String object.
        Returns:
        a String object.
      • setClassUnderAnalysisName

        public void setClassUnderAnalysisName​(String _name)

        setClassUnderAnalysisName.

        Parameters:
        _name - a String object.