|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSemant.Type
Semant.Type.CLASS
public static class Type.CLASS
A class encapsulates static (class) fields and methods, may extend a parent class, and describes the structure of its instances.
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 static (class) fields. |
Type.INSTANCE |
instance
|
boolean |
isFinal
Flag indicating if class is final. |
Type.RECORD<Type.FUN> |
methods
The static (class) methods. |
java.lang.String |
name
|
Type.CLASS |
parent
|
Fields inherited from class Semant.Type |
---|
BOOLEAN, INT, NIL, STRING, SYSTEM, VOID |
Constructor Summary | |
---|---|
Type.CLASS(java.lang.String n)
A class. |
Method Summary | |
---|---|
void |
accept(Type.Visitor v)
A type must accept a visitor |
boolean |
coerceTo(Type t)
Classes coerce only if they are identical. |
boolean |
equals(Type t)
Classes are equal only if they are identical. |
Type |
field(java.lang.String n)
Implementation of field for classes. |
boolean |
isLoop()
Check for inheritance cycles. |
Type.FUN |
method(java.lang.String n)
Implementation of method for classes. |
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 java.lang.String name
public Type.CLASS parent
public final Type.INSTANCE instance
public final Type.RECORD<Type> fields
public Type.RECORD<Type.FUN> methods
public boolean isFinal
Constructor Detail |
---|
public Type.CLASS(java.lang.String n)
n
- class nameMethod 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 isLoop()
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 |