KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ext > pao > types > PaoTypeSystem


1 package polyglot.ext.pao.types;
2
3 import polyglot.types.*;
4
5 /**
6  * The PAO type system interface. Several new methods are added to the
7  * type system to facilitate the boxing and unboxing of primitive values.
8  */

9 public interface PaoTypeSystem extends TypeSystem {
10     /**
11      * Returns the method instance for the runtime method that tests two boxed
12      * primitive values for equality.
13      *
14      * @return the method instance for the runtime method that tests two boxed
15      * primitive values for equality.
16      *
17      * @see polyglot.ext.pao.runtime.Primitive#equals(Object, Object)
18      */

19     MethodInstance primitiveEquals();
20
21     /**
22      * Returns the method instance for getting the primitive value from a boxed
23      * representation of primitive values of type <code>t</code>.
24      *
25      * @param t the primitive type for which we want the getter method to access
26      * the primitive value of a boxed primitive value.
27      * @return the method instance for getting the primitive value from a boxed
28      * representation of primitive values of type <code>t</code>.
29      *
30      * @see polyglot.ext.pao.runtime.Boolean#booleanValue()
31      * @see polyglot.ext.pao.runtime.Byte#byteValue()
32      * @see polyglot.ext.pao.runtime.Character#charValue()
33      * @see polyglot.ext.pao.runtime.Double#doubleValue()
34      * @see polyglot.ext.pao.runtime.Float#floatValue()
35      * @see polyglot.ext.pao.runtime.Integer#intValue()
36      * @see polyglot.ext.pao.runtime.Long#longValue()
37      * @see polyglot.ext.pao.runtime.Short#shortValue()
38      */

39     MethodInstance getter(PrimitiveType t);
40
41     /**
42      * Returns the constructor instance for the class used to represent boxed
43      * values of type <code>t</code>.
44      *
45      * @param t the <code>PrimitiveType</code> for which the constructor
46      * instance of the class representing boxed values is returned.
47      * @return the constructor instance for the class used to represent boxed
48      * values of type <code>t</code>.
49      */

50     ConstructorInstance wrapper(PrimitiveType t);
51
52     /**
53      * Returns the class type used to represent boxed values of type
54      * <code>t</code>.
55      *
56      * @param t the <code>PrimitiveType</code> for which the type used to
57      * represent boxed values is returned.
58      * @return the class type used to represent boxed values of type
59      * <code>t</code>.
60      */

61     ClassType boxedType(PrimitiveType t);
62 }
63
Popular Tags