Class ValueEntry

All Implemented Interfaces:
InterfaceType
Direct Known Subclasses:
ValueBoxEntry

public class ValueEntry extends InterfaceEntry
This is the symbol table entry for values.
  • Field Details

  • Constructor Details

    • ValueEntry

      protected ValueEntry()
    • ValueEntry

      protected ValueEntry(ValueEntry that)
    • ValueEntry

      protected ValueEntry(SymtabEntry that, IDLID clone)
  • Method Details

    • clone

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

      public void generate(Hashtable symbolTable, PrintWriter stream)
      Invoke the interface generator.
      Overrides:
      generate in class InterfaceEntry
      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 value generator.
      Overrides:
      generator in class InterfaceEntry
      Returns:
      an object which implements the ValueGen interface.
      See Also:
    • addSupport

      public void addSupport(SymtabEntry supports)
      Add an InterfaceEntry to the list of interfaces which this value supports. During parsing, the parameter to this method COULD be a ForwardEntry, but when parsing is complete, calling supports will return a vector which only contains InterfaceEntry's.
      Parameters:
      supports - a ForwardEntry or InterfaceEntry
    • supports

      public Vector<SymtabEntry> supports()
      This method returns a vector of InterfaceEntrys.
      Returns:
      a Vector of InterfaceEntry
    • addSupportName

      public void addSupportName(String name)
      Add to the list of support names.
      Parameters:
      name - name to add
    • supportsNames

      public Vector<String> supportsNames()
      This method returns a vector of Strings, each of which is a fully qualified name of an interface. This vector corresponds to the supports vector. The first element of this vector is the name of the first element of the supports vector, etc.
      Returns:
      a Vector of Strings
    • derivedFromAddElement

      void derivedFromAddElement(SymtabEntry e, boolean isSafe, Scanner scanner)
      Add a parent value type to the list of parent types for the value. This method:
      • Allows only the first added class to be concrete if the receiver is concrete.
      • Does not allow any added classes to be concrete if the receiver is abstract.
      • Does not allow duplicate classes to be added.
    • derivedFromAddElement

      void derivedFromAddElement(SymtabEntry e, Scanner scanner)
      Overrides:
      derivedFromAddElement in class InterfaceEntry
    • replaceForwardDecl

      public boolean replaceForwardDecl(ForwardEntry oldEntry, InterfaceEntry newEntry)
      Overrides:
      replaceForwardDecl in class InterfaceEntry
    • initializersAddElement

      void initializersAddElement(MethodEntry method, Scanner scanner)
    • initializers

      public Vector<MethodEntry> initializers()
    • tagMethods

      public void tagMethods()
      Tag all methods introduced by the value type as 'value methods' so they can be differentiated in the emitters from any interface methods that the value type supports.
    • isCustom

      public boolean isCustom()
      Get the 'custom' marshaling property.
      Returns:
      if the entry should be marshaled customly
    • setCustom

      public void setCustom(boolean isCustom)
      Set the 'custom' marshaling property.
      Parameters:
      isCustom - if the entry should be marshaled customly
    • isSafe

      public boolean isSafe()
      Return whether or not the value type can be "safely" truncated to its concrete parent type.
      Returns:
      true if it can be safely truncated