|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.tree.Node
xtc.type.Type
xtc.type.DerivedT
xtc.type.FunctionOrMethodT
public abstract class FunctionOrMethodT
The superclass of function and method types.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class xtc.type.Type |
|---|
Type.Tag |
| Field Summary | |
|---|---|
protected java.util.List<Type> |
exceptions
The optional list of exceptions. |
protected java.lang.String |
name
The optional name. |
protected java.util.List<Type> |
parameters
The list of parameter types. |
protected Type |
result
The result type. |
protected boolean |
varargs
The flag for whether the function accepts a variable number of arguments. |
| Constructor Summary | |
|---|---|
FunctionOrMethodT(Type template,
Type result,
java.lang.String name,
java.util.List<Type> parameters,
boolean varargs,
java.util.List<Type> exceptions)
Create a new function or method type. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
java.util.List<Type> |
getExceptions()
Get the list of exceptions. |
java.lang.String |
getName()
Get the name. |
java.util.List<Type> |
getParameters()
Get the list of parameter types. |
Type |
getResult()
Get the result type. |
int |
hashCode()
|
boolean |
isVarArgs()
Determine whether this function accepts a variable number of arguments. |
Type |
seal()
Seal this type. |
void |
setExceptions(java.util.List<Type> exceptions)
Set the list of parameter types. |
void |
setParameters(java.util.List<Type> parameters)
Set the list of parameter types. |
void |
setResult(Type result)
Set the result type. |
void |
write(java.lang.Appendable out)
Write a human readable representation to the specified appendable. |
| Methods inherited from class xtc.type.DerivedT |
|---|
isDerived |
| 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 |
| Field Detail |
|---|
protected Type result
protected java.lang.String name
protected java.util.List<Type> parameters
protected boolean varargs
protected java.util.List<Type> exceptions
| Constructor Detail |
|---|
public FunctionOrMethodT(Type template,
Type result,
java.lang.String name,
java.util.List<Type> parameters,
boolean varargs,
java.util.List<Type> exceptions)
template - The type whose annotations to copy.result - The result type.name - The name.parameters - The list of parameter types.varargs - The flag for accepting a variable number of arguments.exceptions - The list of exception types.| Method Detail |
|---|
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 Type getResult()
public void setResult(Type result)
result - The new result type.
java.lang.IllegalStateException - Signals that this type is sealed.public java.lang.String getName()
getName in class Nodepublic java.util.List<Type> getParameters()
public void setParameters(java.util.List<Type> parameters)
parameters - The list of parameter types.
java.lang.IllegalStateException - Signals that this type is sealed.public boolean isVarArgs()
true if this function accepts a variable
number of arguments.public java.util.List<Type> getExceptions()
public void setExceptions(java.util.List<Type> exceptions)
exceptions - The list of exception types.
java.lang.IllegalStateException - Signals that this type is sealed.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
public void write(java.lang.Appendable out)
throws java.io.IOException
NodeObject.toString().
write in class Nodeout - The appendable.
java.io.IOException - Signals an I/O error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||