xtc.type
Class AliasT

java.lang.Object
  extended by xtc.tree.Node
      extended by xtc.type.Type
          extended by xtc.type.WrappedT
              extended by xtc.type.AliasT
All Implemented Interfaces:
java.lang.Iterable<java.lang.Object>, Locatable

public class AliasT
extends WrappedT

A type alias.

Version:
$Revision: 1.28 $
Author:
Robert Grimm

Nested Class Summary
 
Nested classes/interfaces inherited from class xtc.type.Type
Type.Tag
 
Constructor Summary
AliasT(java.lang.String name)
          Create a new type alias.
AliasT(java.lang.String name, Type type)
          Create a new type alias.
AliasT(Type template, java.lang.String name, Type type)
          Create a new type alias.
 
Method Summary
 AliasT copy()
          Create a deep copy of this type.
 java.lang.String getName()
          Get the name.
 boolean hasAlias()
          Determine whether this type contains an alias.
 boolean isAlias()
          Determine whether this type is an alias.
 Type seal()
          Seal this alias.
 AliasT toAlias()
          Get this type as an alias.
 void write(java.lang.Appendable out)
          Write a human readable representation to the specified appendable.
 Type.Tag wtag()
          Get this wrapped type's tag.
 
Methods inherited from class xtc.type.WrappedT
equals, getAttribute, getConstant, getLanguage, getLocation, getScope, getShape, getType, hasAnnotated, hasAttribute, hasConstant, hasEnum, hasEnumerator, hashCode, hasInstantiated, hasLanguage, hasLocation, hasParameterized, hasScope, hasShape, hasTagged, hasVariable, isWrapped, resolve, setType, tag, toAnnotated, toEnum, toEnumerator, toInstantiated, toParameterized, toStructOrUnion, toTagged, toVariable, toWrapped
 
Methods inherited from class xtc.type.Type
addAttribute, annotate, attribute, attribute, attribute, attributes, cast, checkNotSealed, constant, constant, copy, deannotate, getAttribute, getConstant, getLanguage, getLocation, getScope, getShape, hasAttribute, hasAttribute, hasAttribute, hasAttributes, hasConstant, hasError, hasLanguage, hasLocation, hasScope, hasShape, hasStructOrUnion, hasTag, hasWTag, isAnnotated, isArray, isBoolean, isClass, isConcrete, isDerived, isEnum, isEnumerator, isError, isFloat, isFunction, isInstantiated, isInteger, isInterface, isInternal, isInternalParameter, isLabel, isMethod, isNamedParameter, isNumber, isPackage, isParameter, isParameterized, isPointer, isSealed, isStruct, isTuple, isUnion, isUnit, isVariable, isVariant, isVoid, isWildcard, language, locate, locate, mark, properties, removeAttribute, removeProperty, resolve, scope, seal, setLocation, setLocation, setProperty, shape, shape, toArray, toBoolean, toClass, toFloat, toFunction, toInteger, toInterface, toInternal, toInternalParameter, toLabel, toMethod, toNamedParameter, toNumber, toPackage, toParameter, toPointer, toStruct, toTuple, toUnion, toUnit, toVariant, toVoid, toWildcard, trace
 
Methods inherited from class xtc.tree.Node
add, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getNode, getProperty, getString, getStringProperty, getTokenText, hasName, hasProperty, hasTraversal, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, remove, set, size, strip, toAnnotation, toList, toString, toToken
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AliasT

public AliasT(java.lang.String name)
Create a new type alias.

Parameters:
name - The name.

AliasT

public AliasT(java.lang.String name,
              Type type)
Create a new type alias.

Parameters:
name - The name.
type - The type.

AliasT

public AliasT(Type template,
              java.lang.String name,
              Type type)
Create a new type alias.

Parameters:
template - The type whose annotations to copy.
name - The name.
type - The type.
Method Detail

seal

public Type seal()
Seal this alias. If this alias is incomplete, i.e., does not have a type, invocations to this method have no effect.

Overrides:
seal in class WrappedT
Returns:
This type.
See Also:
Type.seal(List)

copy

public AliasT copy()
Description copied from class: Type
Create a deep copy of this type. The resulting type is not sealed.

Specified by:
copy in class Type
Returns:
A deep copy of this type.

wtag

public Type.Tag wtag()
Description copied from class: Type
Get this wrapped type's tag. Invocations to this method are not forwarded across wrapped types.

Overrides:
wtag in class Type
Returns:
This wrapped type's tag.
See Also:
Type.tag()

isAlias

public boolean isAlias()
Description copied from class: Type
Determine whether this type is an alias.

Overrides:
isAlias in class Type
Returns:
true if this type is an alias.

hasAlias

public boolean hasAlias()
Description copied from class: Type
Determine whether this type contains an alias.

Overrides:
hasAlias in class WrappedT
Returns:
true if this type contains an alias.

toAlias

public AliasT toAlias()
Description copied from class: Type
Get this type as an alias.

Overrides:
toAlias in class WrappedT
Returns:
This type as an alias.

getName

public java.lang.String getName()
Get the name.

Overrides:
getName in class Node
Returns:
The name.

write

public void write(java.lang.Appendable out)
           throws java.io.IOException
Description copied from class: Node
Write a human readable representation to the specified appendable. If this node supports generic traversal, the default implementation writes this node in algebraic term-format; otherwise, it writes the string returned by Object.toString().

Overrides:
write in class Node
Parameters:
out - The appendable.
Throws:
java.io.IOException - Signals an I/O error.


Copyright © 2012. All Rights Reserved.