| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addAttribute, annotate, attribute, attribute, attribute, attributes, cast, checkNotSealed, constant, constant, copy, 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, isTuple, isUnion, isUnit, isVariable, isVariant, isVoid, isWildcard, isWrapped, language, locate, locate, mark, properties, removeAttribute, removeProperty, resolve, resolve, scope, seal, setLocation, setLocation, setProperty, shape, shape, tag, 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, toTuple, 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, hasName, hasProperty, hasTraversal, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, remove, set, size, strip, toAnnotation, toList, toString, toTokenprotected Type result
protected java.lang.String name
protected java.util.List<Type> parameters
protected boolean varargs
protected java.util.List<Type> exceptions
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.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()
public 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.Objectpublic void write(java.lang.Appendable out)
throws java.io.IOException
NodeObject.toString().Copyright © 2014. All Rights Reserved.