Class AbstractSymbolMappingVisitor

  • Direct Known Subclasses:
    StaticSymbolMappingVisitor

    public abstract class AbstractSymbolMappingVisitor
    extends ExpressionMappingVisitor

    This class is used to update LanguageObjects by replacing one set of symbols with another. There is one abstract method which must be overridden to define how the mapping lookup occurs.

    • Constructor Detail

      • AbstractSymbolMappingVisitor

        protected AbstractSymbolMappingVisitor()
    • Method Detail

      • getMappedSymbol

        protected abstract Symbol getMappedSymbol​(Symbol symbol)
        Get the mapped symbol from the specified symbol. Subclasses should implement this method to look up the target symbol from the specified symbol.
        Parameters:
        symbol - Source symbol
        Returns:
        Target symbol
      • visit

        public void visit​(Delete obj)

        This method updates the Delete object it receives as an argument by replacing the virtual groups/elements with their physical counterparts.

        Overrides:
        visit in class LanguageVisitor
        Parameters:
        obj - The Delete object to be updated with physical groups
      • visit

        public void visit​(Update obj)

        This method updates the Update object it receives as an argument by replacing the virtual groups/elements with their physical counterparts.

        Overrides:
        visit in class LanguageVisitor
        Parameters:
        obj - The Update object to be updated with physical groups
      • getUnmappedSymbols

        public List getUnmappedSymbols()
        Get all symbols that were not mapped during life of visitor. If all symbols were mapped, this will return null.
        Returns:
        List of ElementSymbol and GroupSymbol that were unmapped OR null if all symbols mapped successfully