Class UndefinedDeclaration


public class UndefinedDeclaration extends Declaration

Undefined Declaration.

Link to GitHub: Source File.

Author:
SIMULA Standards Group, Øystein Myhre Andersen
  • Constructor Details

    • UndefinedDeclaration

      public UndefinedDeclaration(String identifier)
      Create a new UndefinedDeclaration.
      Parameters:
      identifier - the variable identifier
    • UndefinedDeclaration

      public UndefinedDeclaration()
      Default constructor used by Attribute File I/O
  • Method Details

    • doChecking

      public void doChecking()
      Description copied from class: SyntaxClass

      Perform semantic checking.

      This must be redefined in every subclass.

      Overrides:
      doChecking in class SyntaxClass
    • doDeclarationCoding

      public void doDeclarationCoding()
      Description copied from class: SyntaxClass
      Output possible declaration Java code.
      Overrides:
      doDeclarationCoding in class SyntaxClass
    • toJavaCode

      public String toJavaCode()
      Description copied from class: SyntaxClass
      Generate Java code for this Syntax Class.
      Overrides:
      toJavaCode in class SyntaxClass
      Returns:
      Java code
    • getFieldRefEntry

      public FieldRefEntry getFieldRefEntry(ConstantPoolBuilder pool)
      ClassFile coding utility: get FieldRefEntry of this SimpleVariable.
      Parameters:
      pool - the ConstantPoolBuilder to use.
      Returns:
      the FieldRefEntry of this SimpleVariable.
    • getFieldIdentifier

      public String getFieldIdentifier()
      Description copied from class: Declaration
      ClassFile coding utility: get getFieldIdentifier.
      Overrides:
      getFieldIdentifier in class Declaration
      Returns:
      the resulting String.
    • buildDeclaration

      public void buildDeclaration(ClassBuilder classBuilder, BlockDeclaration encloser)
      Description copied from class: Declaration
      Output Java ByteCode. Treat Declaration.
      Overrides:
      buildDeclaration in class Declaration
      Parameters:
      classBuilder - the classBuilder to use.
      encloser - the owning block.
    • buildInitAttribute

      public void buildInitAttribute(CodeBuilder codeBuilder)
      Description copied from class: Declaration
      Output Java ByteCode. Build init code for an Attribute.
      Overrides:
      buildInitAttribute in class Declaration
      Parameters:
      codeBuilder - the codeBuilder to use.
    • printTree

      public void printTree(int indent, Object head)
      Description copied from class: SyntaxClass
      Utility print syntax tree method.
      Overrides:
      printTree in class SyntaxClass
      Parameters:
      indent - number of spaces leading the lines
      head - the head of the tree.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • writeObject

      public void writeObject(AttributeOutputStream oupt) throws IOException
      Description copied from class: SyntaxClass
      Write a SyntaxClass object to a AttributeOutputStream.
      Overrides:
      writeObject in class SyntaxClass
      Parameters:
      oupt - the AttributeOutputStream to write to.
      Throws:
      IOException - if something went wrong.
    • readObject

      public static UndefinedDeclaration readObject(AttributeInputStream inpt) throws IOException
      Read and return an object.
      Parameters:
      inpt - the AttributeInputStream to read from
      Returns:
      the object read from the stream.
      Throws:
      IOException - if something went wrong.