All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----epp.TypeSystem
注意: このクラスは、 javadoc を作るための便宜的なクラスです。 実際の EPP のソースコード中には存在しません。
plug-in は、これらのメソッドを拡張することで、 新たに導入した型と既存の型との間の関係を定義することができます。
いくつかのメソッドは、 TypeChecker から呼び出しやすいように、 クラス Type の static method としても定義されています。 例えば、メソッド isSuperType(t1, t2) は、 TypeChecker のメソッド中から Type.isSuperType(t1, t2) と書いて呼び出すことができます。 このメソッドは、実際には Ld-2 メソッドに delegation されます。
public TypeSystem()
public boolean equals(Type t1,
Type t2)
このメソッドは、クラス Type の static method から delegation されます。
public void confirmType(Type type,
Tree tree)
public boolean isSuperType(Type t1,
Type t2)
Return true iff t1 is a super type or same type of t2.
If t1 is "unknown extended type", it is fatal error.
Otherwise, if t2 is "unknown extended type", false will be returned.
このメソッドは、クラス Type の static method から delegation されます。
public boolean isAncestor(ClassInfo info1,
ClassInfo info2)
Return true iff info1 and info2 has the same name
or a class info1 is an ancestor of class info2.
info1 と info2 は共に class を表す ClassInfo でなければなりません。 (どちらかが interface を表す ClassInfo であった場合の動作は未定義です。)
public boolean doesImplement(ClassInfo info1,
ClassInfo info2)
Return true iff info1 and info2 has the same name
or a interface info1 is implemented by a class info2
or a interface info1 is extended by a interface info2 .
public Tree coerce(Type type,
Tree tree)
plug-in はこのメソッドを拡張することで、 標準の Java にない「暗黙の型変換」を実装することができます。
このメソッドは、クラス Type の static method から delegation されます。
public FieldInfo selectField(Type targetType,
Symbol fieldName)
このメソッドは、クラス Type の static method から delegation されます。
public Object[] typeCheckAndSelectMethod(Type targetType,
Symbol methodName,
Tree argumentList)
このメソッドは、クラス Type の static method から delegation されます。
public MethodInfo selectMostSpecificMethod(String methodName,
MethodInfo methods[],
Tree argumentList)
public boolean confirmArgs(MethodInfo method,
Tree argumentList)
public boolean moreSpecificMethod(MethodInfo m1,
MethodInfo m2)
public Tree coerceArgumentList(Tree argumentList,
MethodInfo selectedMethod)
public String argumentListToSignatureString(Tree argumentList)
public void typeCheckBlockStatements(int i,
Tree args[],
TreeVec newArgs)
このメソッドは、クラス Type の static method から delegation されます。
public void typeCheckBlockStatement(Tree tree,
int i,
Tree args[],
TreeVec newArgs)
public void typeCheckVariableDeclarators(int vi,
Tree vardecls[],
TreeVec newVardecls,
Tree declTree,
Tree modifiers,
Tree typeTree,
int i,
Tree args[],
TreeVec newArgs)
public void typeCheckVariableDeclarator(Tree tree,
int vi,
Tree vardecls[],
TreeVec newVardecls,
Tree declTree,
Tree modifiers,
Tree typeTree,
int i,
Tree args[],
TreeVec newArgs)
public Tree checkVariableDeclaratorId(Type type,
Tree tree,
Tree declaredVars[])
All Packages Class Hierarchy This Package Previous Next Index