| |
|
| xtc.type.Type xtc.type.Parameter
All known Subclasses: xtc.type.Wildcard,
Parameter | public class Parameter extends Type (Code) | | A type parameter. When a type is parameterized, all occurrences of
the same parameter should also be the same instance of this class.
Furthermore, the type should be wrapped in a
ParameterizedT listing all parameters. Instantiation of a parameterized type does
not require replacing all parameters, but rather should be
implemented by wrapping the paramterized type in a
InstantiatedT listing all arguments. To support efficient
unification, this class implements union/find operations with path
compression through the
Parameter.bind(Type) and
Parameter.lookup() operations.
author: Robert Grimm version: $Revision: 1.3 $ |
Parameter | public Parameter(String name)(Code) | | Create a new parameter.
Parameters: name - The name. |
Parameter | public Parameter(Type template, String name)(Code) | | Create a new parameter.
Parameters: template - The type whose annotations to copy. Parameters: name - The name. |
bind | public void bind(Type type)(Code) | | Bind this parameter to the specified type.
Parameters: type - The type. throws: IllegalStateException - Signals that this parameter issealed or already bound. |
getName | public String getName()(Code) | | Get the name.
The name. |
hashCode | public int hashCode()(Code) | | |
isParameter | public boolean isParameter()(Code) | | |
lookup | public Type lookup()(Code) | | Look up this parameter's binding. If this parameter is not
bound, this method returns the parameter. Otherwise, it returns
the bound type.
This parameter's binding. |
|
|
|