|
||||||||||
| 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
xtc.type.FunctionT
public class FunctionT
A function type. Note that a C function with an old-style
declarator must be annotated with the Constants.ATT_STYLE_OLD attribute. An old-style definition
must also be annotated with the Constants.ATT_DEFINED
attribute.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class xtc.type.Type |
|---|
Type.Tag |
| Field Summary |
|---|
| Fields inherited from class xtc.type.FunctionOrMethodT |
|---|
exceptions, name, parameters, result, varargs |
| Constructor Summary | |
|---|---|
FunctionT(Type result)
Create a new function type. |
|
FunctionT(Type result,
java.util.List<Type> parameters,
boolean varargs)
Create a new function type. |
|
FunctionT(Type template,
Type result,
java.util.List<Type> parameters,
boolean varargs)
Create a new function type. |
|
| Method Summary | |
|---|---|
FunctionT |
copy()
Create a deep copy of this type. |
boolean |
isFunction()
Determine whether this type is a function. |
Type.Tag |
tag()
Get this type's tag. |
FunctionT |
toFunction()
Get this type as a function. |
| Methods inherited from class xtc.type.FunctionOrMethodT |
|---|
equals, getExceptions, getName, getParameters, getResult, hashCode, isVarArgs, seal, setExceptions, setParameters, setResult, write |
| 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 |
| Constructor Detail |
|---|
public FunctionT(Type result)
result - The result type.
public FunctionT(Type result,
java.util.List<Type> parameters,
boolean varargs)
result - The result type.parameters - The list of parameter types.varargs - The flag for accepting a variable number of arguments.
public FunctionT(Type template,
Type result,
java.util.List<Type> parameters,
boolean varargs)
template - The type whose annotations to copy.result - The result type.parameters - The list of parameter types.varargs - The flag for accepting a variable number of arguments.| Method Detail |
|---|
public FunctionT copy()
Type
copy in class Typepublic Type.Tag tag()
Type
tag in class TypeType.wtag()public boolean isFunction()
Type
isFunction in class Typetrue if this type is a function.public FunctionT toFunction()
Type
toFunction in class Type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||