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

hlt.language.design.kernel

## Class ProtoExpression

- java.lang.Object
- - hlt.language.design.kernel.Expression
  - - hlt.language.design.kernel.ProtoExpression

- All Implemented Interfaces:
    Locatable
  Direct Known Subclasses:
    Application, ArrayExtension, ArrayInitializer, ArraySlot, ArraySlotUpdate, ArrayToMap, Assignment, Comprehension, Constant, Definition, ExitWithValue, FieldUpdate, Global, HideType, Homomorphism, IfThenElse, NewArray, NewCollection, OpenType, Parameter, Scope, Tuple, TupleProjection, TupleUpdate, UndecidedExpression

      public abstract class ProtoExpression
      extends Expression

  This class factors out implementation that's common to all expressions.
  See Also:
    `Expression`

- - ### Field Summary

    - ### Fields inherited from class hlt.language.design.kernel.Expression

      `VOID_ASSIGNMENTS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProtoExpression()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Type` | `checkedType()` This method returns the final unambiguously checked type of this expression.
    `void` | `setCheckedType(Type type)` NB: this is not `final` because itis overridden in `Abstraction` and `Global`.
    `void` | `setType(Type type)` This method forcibly sets this expression's type field, if it has one, to the specified type.
    `Type` | `type()` This method returns the current type of this expression.
    `Type` | `typeRef()` This method returns this expression's undereferenced type field if it has one.

    - ### Methods inherited from class hlt.language.design.kernel.Expression

      `addType, addTypes, boxSort, compile, containsFreeName, copy, enclosingScope, extent, getEnd, getStart, isConstant, isEquality, isFalse, isHiddenSlicing, isNull, isSelector, isSlicing, isTrue, isVoid, locationString, numberOfSubexpressions, otherTypes, parameters, sanitizeNames, sanitizeSorts, setCheckedType, setCheckedTypeLocked, setEnd, setExtent, setOtherTypes, setStart, setSubexpression, shiftOffsets, shiftOffsets, sort, subexpression, substitute, typeCheck, typeCheck, typeCheck, typeCheckLocked, typedCopy`

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

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

- - ### Constructor Detail

    - #### ProtoExpression

          public ProtoExpression()

  - ### Method Detail

    - #### type

          public final Type type()

      Description copied from class: `Expression`
      This method returns the current type of this expression. It will typically, but not necessarily, be the dereferenced value of a `TypeParameter` field. A notable exception is a `Local` since its type method will always return the type of the `Parameter` it stands for.
      Specified by:
        `type` in class `Expression`

    - #### setType

          public final void setType(Type type)

      Description copied from class: `Expression`
      This method forcibly sets this expression's type field, if it has one, to the specified type. It will be an empty method otherwise.
      Specified by:
        `setType` in class `Expression`

    - #### typeRef

          public final Type typeRef()

      Description copied from class: `Expression`
      This method returns this expression's undereferenced type field if it has one. It will return `null` otherwise.
      Specified by:
        `typeRef` in class `Expression`

    - #### checkedType

          public final Type checkedType()

      Description copied from class: `Expression`
      This method returns the final unambiguously checked type of this expression.
      Specified by:
        `checkedType` in class `Expression`

    - #### setCheckedType

          public void setCheckedType(Type type)

      NB: this is not `final` because itis overridden in `Abstraction` and `Global`.
      Specified by:
        `setCheckedType` in class `Expression`