Class AttributeEntry


public class AttributeEntry extends MethodEntry
This is the symbol table entry for attributes. An attribute is simply two methods with no exceptions or contexts: a get method and, if not readOnly, a set method.
  • Field Details

    • attributeGen

      static AttributeGen attributeGen
    • _readOnly

      public boolean _readOnly
  • Constructor Details

    • AttributeEntry

      protected AttributeEntry()
    • AttributeEntry

      protected AttributeEntry(AttributeEntry that)
    • AttributeEntry

      protected AttributeEntry(InterfaceEntry that, IDLID clone)
  • Method Details

    • clone

      public Object clone()
      Description copied from class: SymtabEntry
      This is a shallow copy clone
      Overrides:
      clone in class MethodEntry
    • generate

      public void generate(Hashtable symbolTable, PrintWriter stream)
      Invoke the attribute generator.
      Overrides:
      generate in class MethodEntry
      Parameters:
      symbolTable - the symbol table is a hash table whose key is a fully qualified type name and whose value is a SymtabEntry or a subclass of SymtabEntry.
      stream - the stream to which the generator should sent its output.
      See Also:
    • generator

      public Generator generator()
      Access the attribute generator.
      Overrides:
      generator in class MethodEntry
      Returns:
      an object which implements the AttributeGen interface.
      See Also:
    • readOnly

      public boolean readOnly()
      If true, only a get method will be generated.
      Returns:
      if the attribute is readonly
    • readOnly

      public void readOnly(boolean readOnly)
      Sets the readOnly parameter
      Parameters:
      readOnly - If true, only a get method will be generated.