//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
// PLEASE DO NOT EDIT WITHOUT THE EXPLICIT CONSENT OF THE AUTHOR! \\
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\

package ilog.language.design.kernel;

/**
 * @version     Last modified on Thu Sep 19 17:55:08 2002 by hak
 * @version          modified on Thu Jul 18 16:20:32 2002 by pviry
 * @author      <a href="mailto:hak@ilog.fr">Hassan A&iuml;t-Kaci</a>
 * @copyright   &copy; 2000-2002 <a href="http://www.ilog.fr/">ILOG, S.A.</a>
 */

import ilog.language.design.types.*;

/**
 * This class factors out implementation that's common to all expressions.
 * @see Expression
 */
public abstract class ProtoExpression extends Expression
{
  protected Type _type = new TypeParameter();
  protected Type _checkedType;

  public final Type type ()
    {
      return _type.value();
    }

  public final void setType (Type type)
    {
      if (type != null) _type = type;
    }

  public final Type typeRef ()
    {
      return _type;
    }

  public final Type checkedType ()
    {
      return _checkedType;
    }

  /* <b>NB:</b> <tt>setCheckedType</tt> muat be declared not <tt>final</tt> because
   * it will be overridden in <a href="Abstraction.html"><tt>Abstraction</tt></a>
   * and <a href="Global.html"><tt>Global</tt></a>.
   */
  public void setCheckedType (Type type)
    {
      _checkedType = type;
    }

}
