Class BaseTransformer

java.lang.Object
edu.udel.cis.vsl.abc.transform.IF.BaseTransformer
All Implemented Interfaces:
Transformer

public abstract class BaseTransformer extends Object implements Transformer
A very basic partial implementation of Transformer. Implements the book-keeping methods getCode(), getShortDescription(), toString(), and provides similar fields. Most implementations of Transformer can extend this class.
  • Method Details

    • getCode

      public String getCode()
      Description copied from interface: Transformer
      Returns the short name of this transformer, e.g., "mpi", or "prune".
      Specified by:
      getCode in interface Transformer
      Returns:
      the short name ("code") of this transformer
    • getShortDescription

      public String getShortDescription()
      Description copied from interface: Transformer
      A brief (one line) description of what this transformer does, suitable for appearing in a help message.
      Specified by:
      getShortDescription in interface Transformer
      Returns:
      a short description of what this transformer does
    • toString

      public String toString()
      Description copied from interface: Transformer
      Returns the long name of this transformer, e.g., "MPI Transformer" or "Pruner". The name is suitable for human consumption.
      Specified by:
      toString in interface Transformer
      Overrides:
      toString in class Object
      Returns:
      long name of this transformer
    • newStringLiteralNode

      public StringLiteralNode newStringLiteralNode(String method, String representation) throws SyntaxException
      Description copied from interface: Transformer
      Produces a new StringLiteralNode.
      Specified by:
      newStringLiteralNode in interface Transformer
      Parameters:
      method - name of transformer method responsible for producing the new token; used to form the Formation that will ultimately be used in diagnostic message
      representation - the text of the string literal exactly as it would appear in a program source; this must include the surrounding (single or double) quotes
      Returns:
      new string literal node
      Throws:
      SyntaxException - if the representation does not conform to the C11 specification of string literals