tgl.compiler.error
クラス VarDuplicationError

java.lang.Object
  上位を拡張 tgl.compiler.error.VarDuplicationError
すべての実装されたインタフェース:
CompileError

public class VarDuplicationError
extends java.lang.Object
implements CompileError

同じ識別子をもつ変数を2回以上宣言したときに発生するエラーを表すクラス。 エラーを起こした識別子を保持する。


コンストラクタの概要
VarDuplicationError(java.lang.String name)
          エラーを起こした変数を表す識別子を受け取り、インスタンスを作成する。
 
メソッドの概要
 void error(CompileErrorHandler handler)
          エラーを報告するための処理をエラーハンドラに委譲する。
(package private)  java.lang.String getName()
          変数名を取得する。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

VarDuplicationError

public VarDuplicationError(java.lang.String name)
エラーを起こした変数を表す識別子を受け取り、インスタンスを作成する。

パラメータ:
name - エラーを起こした変数を表す識別子
メソッドの詳細

getName

java.lang.String getName()
変数名を取得する。

戻り値:
変数名

error

public void error(CompileErrorHandler handler)
           throws java.lang.Exception
エラーを報告するための処理をエラーハンドラに委譲する。

定義:
インタフェース CompileError 内の error
パラメータ:
handler - コンパイルエラーを処理するエラーハンドラ
例外:
CompileException - コンパイル時のエラーを表す例外(Exceptionのサブクラス)
java.lang.Exception