KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > types > TypeObject


1 package polyglot.types;
2
3 import polyglot.util.*;
4 import java.io.*;
5
6 /**
7  * A <code>TypeObject</code> is a compile-time value created by the type system.
8  * It is a static representation of a type that is not necessarily
9  * first-class. It is similar to a compile-time meta-object.
10  */

11 public interface TypeObject extends Copy, Serializable
12 {
13     /**
14      * Return true if the type object contains no unknown/ambiguous types.
15      */

16     boolean isCanonical();
17
18     /**
19      * The object's type system.
20      */

21     TypeSystem typeSystem();
22
23     /**
24      * The object's position, or null.
25      */

26     Position position();
27     
28     /**
29      * Return true iff this type object is the same as <code>t</code>.
30      * All Polyglot extensions should attempt to maintain pointer
31      * equality between TypeObjects. If this cannot be done,
32      * extensions can override TypeObject_c.equalsImpl(), and
33      * don't forget to override hashCode().
34      *
35      * @see polyglot.ext.jl.types.TypeObject_c#equalsImpl(TypeObject)
36      * @see java.lang.Object#hashCode()
37      */

38     boolean equalsImpl(TypeObject t);
39 }
40
Popular Tags