ClassInfo (API documentation of hlt.language packages)
Date: 2013-01-30

hlt.language.design.types

## Class ClassInfo

- java.lang.Object
- - hlt.language.design.types.TypeTermScheme
  - - hlt.language.design.types.ClassInfo

-     public class ClassInfo
      extends TypeTermScheme

  This class holds information about a class type needed for compiling field access and update, and enables specifying an implementation for methods manipulating objects of this type.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClassInfo()` Constructs an empty class info.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `fillClassInfo(Tables tables, ClassType classType, java.util.AbstractList members, java.util.AbstractList types, java.util.AbstractList fieldInits, Type[] parameters)` Fills this class info with all the information specified by its class declaration.
    `boolean` | `isDeclared()`
    `void` | `undeclareClass(Tables tables, ClassType classType)` Resets all the information of this class info to that of an empty class info.

    - ### Methods inherited from class hlt.language.design.types.TypeTermScheme

      `arity, parameters`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClassInfo

          public ClassInfo()

      Constructs an empty class info.

  - ### Method Detail

    - #### fillClassInfo

          public final void fillClassInfo(Tables tables,
                           ClassType classType,
                           java.util.AbstractList members,
                           java.util.AbstractList types,
                           java.util.AbstractList fieldInits,
                           Type[] parameters)
                                   throws ClassDeclarationException

      Fills this class info with all the information specified by its class declaration. It creates the members of the specified class type from the given information; if some members have duplicate signatures, a `ClassDeclarationException` is thrown and no type definition for the class or any of its member is taken into account. Note that the field offsets are not computed by, or kept in, the class info itself but by, and in, the field's `DefinedEntry`'s. This is not only much more efficient to have the offset readily available there when compiling field accesses and updates, it is also necessary as these offsets can be safely computed only once the fields have been fully type-checked to know which of an object's sort array to offset them in.
      Throws:
        `ClassDeclarationException`

    - #### isDeclared

          public final boolean isDeclared()

    - #### undeclareClass

          public final void undeclareClass(Tables tables,
                            ClassType classType)

      Resets all the information of this class info to that of an empty class info.