| |
|
| xtc.type.Type xtc.type.DerivedT xtc.type.VariantT
VariantT | public class VariantT extends DerivedT (Code) | | A variant type. Variants can be monomorphic or polymorphic, with
the latter possibly sharing tuples with other variants.
Monomorphic variants must be named and are compared through name
equivalence. Polymorphic variants may be anonymous and are
compared through structural equivalence.
author: Robert Grimm version: $Revision: 1.12 $ |
VariantT | public VariantT(String name)(Code) | | Create a new incomplete variant type. The new variant type is
not polymorphic.
Parameters: name - The name. throws: NullPointerException - Signals that the name is null. |
VariantT | public VariantT(String name, List<TupleT> tuples)(Code) | | Create a new variant type. The new variant type is not
polymorphic.
Parameters: name - The name. Parameters: tuples - The tuples. throws: NullPointerException - Signals that the name is null. |
VariantT | public VariantT(String name, boolean polymorphic, List<TupleT> tuples)(Code) | | Create a new variant type. Note that polymorphic variants may be
anonymous, i.e., have a null name.
Parameters: name - The name. Parameters: polymorphic - The flag for polymorphic variants. Parameters: tuples - The tuples. throws: NullPointerException - Signals that the name is null for amonomorphic variant. |
VariantT | public VariantT(Type template, String name, boolean polymorphic, List<TupleT> tuples)(Code) | | Create a new variant type.
Parameters: template - The type whose annotations to copy. Parameters: name - The name. Parameters: polymorphic - The flag for polymorphic variants. Parameters: tuples - The tuples. throws: NullPointerException - Signals that the name is null for amonomorphic variant. |
equals | public boolean equals(Object o)(Code) | | Determine whether this variant equals the specified object. This
method implements name equivalence for non-polymorphic variants
and structural equivalence for polymorphic variants.
Parameters: o - The object. true if this variant equals the object. |
getName | public String getName()(Code) | | Get this variant's name.
The name or null if this variant is anonymous. |
getQualifier | public String getQualifier()(Code) | | Get this variant's qualifier.
The qualifier or null if this variant doesnot have a qualified name. |
getSimpleName | public String getSimpleName()(Code) | | Get this variant's simple name.
The simple name or null if this variant isanonymous. |
getTuples | public List<TupleT> getTuples()(Code) | | Get this variant's tuples.
The list of tuples. |
hashCode | public int hashCode()(Code) | | |
isPolymorphic | public boolean isPolymorphic()(Code) | | Determine whether the variant is polymorphic.
true if the variant is polymorphic. |
isVariant | public boolean isVariant()(Code) | | |
lookup | public Type lookup(String name)(Code) | | Look up the tuple with the specified name.
Parameters: name - The name. The tuple or ErrorT.TYPE if this variant has nosuch tuple. |
lookupSimple | public Type lookupSimple(String name)(Code) | | Look up the tuple with the specified simple name.
Parameters: name - The simple name. The first such tuple or ErrorT.TYPE if thisvariant has no such tuple. |
setTuples | public void setTuples(List<TupleT> tuples)(Code) | | Set this variant's tuples.
Parameters: tuples - The new list of tuples. |
Methods inherited from xtc.type.DerivedT | public boolean isDerived()(Code)(Java Doc)
|
|
|
|