|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSemant.Type
Semant.Type.INSTANCE
public static class Type.INSTANCE
A class instance is an instance of some class, encapsulating instance fields and instance methods.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class Semant.Type |
---|
Type.ARRAY, Type.CLASS, Type.FUN, Type.INSTANCE, Type.Print, Type.RECORD<T extends Type>, Type.Visitor |
Field Summary | |
---|---|
Type.RECORD<Type> |
fields
The instance fields. |
Type.CLASS |
instanceOf
|
Type.RECORD<Type.FUN> |
methods
The instance methods. |
Fields inherited from class Semant.Type |
---|
BOOLEAN, INT, NIL, STRING, SYSTEM, VOID |
Constructor Summary | |
---|---|
Type.INSTANCE(Type.CLASS c)
An instance of some class. |
Method Summary | |
---|---|
void |
accept(Type.Visitor v)
A type must accept a visitor |
boolean |
coerceTo(Type t)
Instances coerce if they are instances of equal or parent classes. |
boolean |
equals(Type t)
Instances are equal if they are instances of equal classes. |
Type |
field(java.lang.String n)
Implementation of field for instances. |
Type.FUN |
method(java.lang.String n)
Implementation of method for instances. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final Type.CLASS instanceOf
public final Type.RECORD<Type> fields
public final Type.RECORD<Type.FUN> methods
Constructor Detail |
---|
public Type.INSTANCE(Type.CLASS c)
c
- the classMethod Detail |
---|
public Type field(java.lang.String n)
field
in class Type
n
- name of the field
public Type.FUN method(java.lang.String n)
method
in class Type
n
- name of the method
public boolean equals(Type t)
equals
in class Type
t
- target type
public boolean coerceTo(Type t)
coerceTo
in class Type
t
- target type
public java.lang.String toString()
toString
in class java.lang.Object
public void accept(Type.Visitor v)
Type
accept
in class Type
v
- the visitor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |