public class TupleT extends DerivedT
| Constructor and Description |
|---|
TupleT()
Create a new incomplete and anonymous tuple type.
|
TupleT(java.util.List<Type> types)
Create a new anonymous tuple type.
|
TupleT(java.lang.String name)
Create a new incomplete tuple type.
|
TupleT(java.lang.String name,
java.util.List<Type> types)
Create a new tuple type.
|
TupleT(java.lang.String name,
Type type)
Create a new tuple type.
|
TupleT(Type template,
java.lang.String name,
java.util.List<Type> types)
Create a new tuple type.
|
| Modifier and Type | Method and Description |
|---|---|
TupleT |
copy()
Create a deep copy of this type.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getName()
Get this tuple's name.
|
java.lang.String |
getSimpleName()
Get this tuple's simple name.
|
java.util.List<Type> |
getTypes()
Get the element types.
|
int |
hashCode() |
boolean |
hasName()
Determine whether this tuple has a name.
|
boolean |
hasName(java.lang.String name)
Determine whether this tuple has the specified name.
|
boolean |
hasSimpleName(java.lang.String name)
Determine whether this tuple has the specified simple name.
|
boolean |
isTuple()
Determine whether this type is an tuple.
|
Type |
seal()
Seal this type.
|
void |
setTypes(java.util.List<Type> types)
Set the element types.
|
Type.Tag |
tag()
Get this type's tag.
|
TupleT |
toTuple()
Get this type as an tuple.
|
void |
write(java.lang.Appendable out)
Write a human readable representation to the specified
appendable.
|
addAttribute, annotate, attribute, attribute, attribute, attributes, cast, checkNotSealed, constant, constant, copy, deannotate, getAttribute, getAttribute, getConstant, getConstant, getLanguage, getLanguage, getLocation, getLocation, getScope, getScope, getShape, getShape, hasAlias, hasAnnotated, hasAttribute, hasAttribute, hasAttribute, hasAttribute, hasAttributes, hasConstant, hasConstant, hasEnum, hasEnumerator, hasError, hasInstantiated, hasLanguage, hasLanguage, hasLocation, hasLocation, hasParameterized, hasScope, hasScope, hasShape, hasShape, hasStructOrUnion, hasTag, hasTagged, hasVariable, hasWTag, isAlias, isAnnotated, isArray, isBoolean, isClass, isConcrete, isEnum, isEnumerator, isError, isFloat, isFunction, isInstantiated, isInteger, isInterface, isInternal, isInternalParameter, isLabel, isMethod, isNamedParameter, isNumber, isPackage, isParameter, isParameterized, isPointer, isSealed, isStruct, isUnion, isUnit, isVariable, isVariant, isVoid, isWildcard, isWrapped, language, locate, locate, mark, properties, removeAttribute, removeProperty, resolve, resolve, scope, seal, setLocation, setLocation, setProperty, shape, shape, toAlias, toAnnotated, toArray, toBoolean, toClass, toEnum, toEnumerator, toFloat, toFunction, toInstantiated, toInteger, toInterface, toInternal, toInternalParameter, toLabel, toMethod, toNamedParameter, toNumber, toPackage, toParameter, toParameterized, toPointer, toStruct, toStructOrUnion, toTagged, toUnion, toUnit, toVariable, toVariant, toVoid, toWildcard, toWrapped, trace, wtagadd, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getNode, getProperty, getString, getStringProperty, getTokenText, hasProperty, hasTraversal, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, remove, set, size, strip, toAnnotation, toList, toString, toTokenpublic TupleT()
public TupleT(java.util.List<Type> types)
types - The types.public TupleT(java.lang.String name)
name - The name.public TupleT(java.lang.String name,
Type type)
name - The name.type - The only element type.public TupleT(java.lang.String name,
java.util.List<Type> types)
name - The name.types - The element types.public Type seal()
Typetype, the corresponding overridden method reads:
public Type seal() {
if (! isSealed()) {
super.seal();
type.seal();
}
return this;
}
First testing whether a type is sealed and then invoking the
superclass' seal() method avoids infinite recursions
for mutually recursive types.seal in class TypeType.seal(List)public TupleT copy()
Typepublic Type.Tag tag()
Typetag in class TypeType.wtag()public boolean isTuple()
Typepublic boolean hasName()
true if this tuple has a name.public boolean hasName(java.lang.String name)
public boolean hasSimpleName(java.lang.String name)
name - The simple name.true if this tuple has the simple name.public java.lang.String getName()
public java.lang.String getSimpleName()
null if this tuple is
anonymous.public java.util.List<Type> getTypes()
public void setTypes(java.util.List<Type> types)
types - The new element types.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic void write(java.lang.Appendable out)
throws java.io.IOException
NodeObject.toString().Copyright © 2014. All Rights Reserved.