Interface SexprMapper

All Known Implementing Classes:
ModelMapper

public interface SexprMapper
An interface for mapping S-expressions to objects
  • Method Details

    • mapSymbol

      Object mapSymbol(SexprSymbol symbol) throws MappingException
      Map an S-expression symbol to an object
      Parameters:
      symbol - The symbol to map
      Returns:
      The value the symbol maps to
      Throws:
      MappingException - If there is an error performing the mapping
    • mapSymbolToClass

      Class mapSymbolToClass(SexprSymbol symbol) throws MappingException
      Map an S-expression symbol to a class
      Parameters:
      symbol - The symbol to map
      Returns:
      The class the symbol maps to
      Throws:
      MappingException - If there is an error performing the mapping
    • mapDouble

      Object mapDouble(SexprDouble d) throws MappingException
      Map an S-expression double value to an object
      Parameters:
      d - The double value to map
      Returns:
      The object the value maps to
      Throws:
      MappingException - If there is an error performing the mapping
    • mapInt

      Object mapInt(SexprInt i) throws MappingException
      Map an S-expression int to an object
      Parameters:
      i - The S-expression int that should be mapped
      Returns:
      The object the int maps to
      Throws:
      MappingException - If there is an error performing the mapping
    • mapString

      Object mapString(SexprString s) throws MappingException
      Map an S-expression string to an object
      Parameters:
      s - The string to map
      Returns:
      The object the string maps to
      Throws:
      MappingException - If there is an error performing the mapping
    • mapList

      Object mapList(SexprList l, Class targetClass) throws MappingException
      Map an S-expression list to an object
      Parameters:
      l - The list to map
      targetClass - The class that the object is expected to map to
      Returns:
      The object that the list has been mapped into
      Throws:
      MappingException - If there is an error performing the mapping