Package org.eclipse.steady.java.sign
Class UniqueNameNormalizer
- java.lang.Object
-
- org.eclipse.steady.java.sign.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConstructIds(Collection<ConstructId> _classes)addConstructIds.voidaddStrings(String[] _class_names)addStrings.voidaddStrings(Collection<String> _class_names)addStrings.static UniqueNameNormalizergetInstance()Getter for the fieldinstance.booleanhaveEqualUniqueName(ch.uzh.ifi.seal.changedistiller.model.entities.SourceCodeEntity _e1, ch.uzh.ifi.seal.changedistiller.model.entities.SourceCodeEntity _e2)StringinlineConstants(String _string)inlineConstants.StringnormalizeUniqueName(ch.uzh.ifi.seal.changedistiller.model.entities.SourceCodeEntity _entity)Applies changes to the unique name of the givenSourceCodeEntity, potentially dependent on its specificEntityType.StringnormalizeUniqueName(String _string)Applies changes that are independent of a givenEntityTypeto the givenString.StringremoveLeadingClassName(String _string)removeLeadingClassName.StringremoveNumberCasts(String _string)removeNumberCasts.voidsetClassLoader(ClassLoader _cl)Sets the class loader used for inlining constants, seefindConstants(String, String).voidsetClassUnderAnalysisName(String _name)setClassUnderAnalysisName.
-
-
-
Method Detail
-
getInstance
public static UniqueNameNormalizer getInstance()
Getter for the field
instance.- Returns:
- a
UniqueNameNormalizerobject.
-
addStrings
public final void addStrings(Collection<String> _class_names)
addStrings.
- Parameters:
_class_names- aCollectionobject.
-
addStrings
public final void addStrings(String[] _class_names)
addStrings.
- Parameters:
_class_names- an array ofStringobjects.
-
addConstructIds
public final void addConstructIds(Collection<ConstructId> _classes)
addConstructIds.
- Parameters:
_classes- aCollectionobject.
-
setClassLoader
public void setClassLoader(ClassLoader _cl)
Sets the class loader used for inlining constants, seefindConstants(String, String).- Parameters:
_cl- aClassLoaderobject.
-
haveEqualUniqueName
public boolean haveEqualUniqueName(ch.uzh.ifi.seal.changedistiller.model.entities.SourceCodeEntity _e1, ch.uzh.ifi.seal.changedistiller.model.entities.SourceCodeEntity _e2)- Specified by:
haveEqualUniqueNamein interfacech.uzh.ifi.seal.changedistiller.model.entities.IUniqueNameNormalizer
-
normalizeUniqueName
public String normalizeUniqueName(String _string)
Applies changes that are independent of a givenEntityTypeto the givenString. In more detail, the string is trimmed, occurrences of "this." are removed and constants are inlined.
-
normalizeUniqueName
public String normalizeUniqueName(ch.uzh.ifi.seal.changedistiller.model.entities.SourceCodeEntity _entity)
Applies changes to the unique name of the givenSourceCodeEntity, potentially dependent on its specificEntityType.- Specified by:
normalizeUniqueNamein interfacech.uzh.ifi.seal.changedistiller.model.entities.IUniqueNameNormalizer
-
removeLeadingClassName
public String removeLeadingClassName(String _string)
removeLeadingClassName.
-
-