|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norecess.citkit.types.NameType
public class NameType
Data type for a named type.
Constructor Summary | |
---|---|
NameType(ISymbol symbol)
|
|
NameType(ISymbol symbol,
HobbesType binding)
|
|
NameType(java.lang.String name)
|
|
NameType(java.lang.String name,
HobbesType binding)
|
Method Summary | ||
---|---|---|
|
accept(TypeVisitor<T> visitor)
|
|
HobbesType |
actual()
Returns the actual data type this named type represents. |
|
void |
bind(HobbesType type)
Binds the named type to another type. |
|
boolean |
equals(java.lang.Object o)
|
|
HobbesType |
getBinding()
Returns the binding of this named type. |
|
ISymbol |
getSymbol()
|
|
int |
hashCode()
|
|
boolean |
isBound()
Returns a boolean regarding the boundness of this named type. |
|
java.lang.String |
toShortString()
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NameType(ISymbol symbol)
public NameType(ISymbol symbol, HobbesType binding)
public NameType(java.lang.String name)
public NameType(java.lang.String name, HobbesType binding)
Method Detail |
---|
public ISymbol getSymbol()
getSymbol
in interface INameType
public HobbesType actual()
IntegerType
or
RecordType
).
actual
in interface HobbesType
java.lang.NullPointerException
- is the named type is unbound.bind(HobbesType)
,
getBinding()
public void bind(HobbesType type)
actual()
will recursively
call itself on this binding until it reaches a basic type.
bind
in interface INameType
type
- the real type of this named type.actual()
,
getBinding()
public HobbesType getBinding()
actual()
, this
method returns just the binding of this named type; it does not follow
any chain of bindings to find a basic type.
getBinding
in interface INameType
actual()
,
bind(HobbesType)
public boolean isBound()
isBound
in interface HobbesType
true
if this named type is bound, false
otherwise.public <T> T accept(TypeVisitor<T> visitor)
accept
in interface HobbesType
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toShortString()
toShortString
in interface HobbesType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |