public final class GoloFunction extends ExpressionStatement implements Scope
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
GoloFunction.Scope  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
accept(GoloIrVisitor visitor)
Accept the visitor. 
 | 
void | 
addDecorator(Decorator decorator)  | 
void | 
addSyntheticParameters(java.util.Set<java.lang.String> names)  | 
GoloFunction | 
asClosure()  | 
ClosureReference | 
asClosureReference()  | 
GoloFunction | 
block(Block block)  | 
GoloFunction | 
block(java.lang.Object... statements)  | 
void | 
captureClosedReference()  | 
GoloFunction | 
createDecorator()  | 
GoloFunction | 
decoratedWith(java.lang.Object... decorators)  | 
GoloFunction | 
decorator()  | 
GoloFunction | 
decorator(boolean d)  | 
boolean | 
equals(java.lang.Object obj)  | 
int | 
getArity()  | 
Block | 
getBlock()  | 
java.lang.String | 
getDecoratorRef()  | 
java.util.List<Decorator> | 
getDecorators()  | 
java.lang.String | 
getName()  | 
java.util.List<java.lang.String> | 
getParameterNames()  | 
int | 
getSyntheticParameterCount()  | 
java.util.List<java.lang.String> | 
getSyntheticParameterNames()  | 
java.lang.String | 
getSyntheticSelfName()  | 
boolean | 
hasDecorators()  | 
int | 
hashCode()  | 
GoloFunction | 
inAugment()  | 
GoloFunction | 
inAugment(boolean isInAugment)  | 
GoloFunction | 
inScope(GoloFunction.Scope s)  | 
void | 
insertMissingReturnStatement()  | 
boolean | 
isAnonymous()  | 
boolean | 
isDecorated()  | 
boolean | 
isDecorator()  | 
boolean | 
isInAugment()  | 
boolean | 
isLocal()  | 
boolean | 
isMain()  | 
boolean | 
isModuleInit()  | 
boolean | 
isSynthetic()  | 
boolean | 
isVarargs()  | 
GoloFunction | 
local()  | 
GoloFunction | 
local(boolean isLocal)  | 
GoloFunction | 
name(java.lang.String n)  | 
GoloFunction | 
ofAST(GoloASTNode n)  | 
void | 
relink(ReferenceTable table)
Make the given table a parent of this scope. 
 | 
void | 
relinkTopLevel(ReferenceTable table)
Make the given table the top-level parent of this scope. 
 | 
protected void | 
replaceElement(GoloElement original,
              GoloElement newElement)
Replace a child. 
 | 
GoloFunction | 
returns(java.lang.Object expression)  | 
void | 
setSyntheticSelfName(java.lang.String name)  | 
GoloFunction | 
synthetic()  | 
java.lang.String | 
toString()  | 
GoloFunction | 
varargs()  | 
GoloFunction | 
varargs(boolean isVarargs)  | 
void | 
walk(GoloIrVisitor visitor)
Walk the visitor through this node children. 
 | 
GoloFunction | 
withParameters(java.util.Collection<java.lang.String> names)  | 
GoloFunction | 
withParameters(java.lang.String... names)  | 
ofcantConvert, cantReplace, cantReplace, doesNotContain, getASTNode, getDocumentation, getLocalReferenceTable, getParentNode, getPositionInSourceCode, hasASTNode, makeParentOf, replaceInParentBy, setASTNode, setParentNodepublic GoloFunction ofAST(GoloASTNode n)
ofAST in class GoloElementpublic GoloFunction name(java.lang.String n)
public java.lang.String getName()
public boolean isMain()
public boolean isModuleInit()
public boolean isAnonymous()
public GoloFunction synthetic()
public boolean isSynthetic()
public GoloFunction decorator()
public GoloFunction decorator(boolean d)
public boolean isDecorator()
public GoloFunction local()
public GoloFunction local(boolean isLocal)
public boolean isLocal()
public GoloFunction inScope(GoloFunction.Scope s)
public GoloFunction inAugment()
public GoloFunction inAugment(boolean isInAugment)
public boolean isInAugment()
public GoloFunction asClosure()
public GoloFunction block(java.lang.Object... statements)
public GoloFunction block(Block block)
public GoloFunction returns(java.lang.Object expression)
public void insertMissingReturnStatement()
public GoloFunction varargs(boolean isVarargs)
public GoloFunction varargs()
public boolean isVarargs()
public int getArity()
public GoloFunction withParameters(java.lang.String... names)
public GoloFunction withParameters(java.util.Collection<java.lang.String> names)
public int getSyntheticParameterCount()
public java.util.List<java.lang.String> getParameterNames()
public java.util.List<java.lang.String> getSyntheticParameterNames()
public void addSyntheticParameters(java.util.Set<java.lang.String> names)
public java.lang.String getSyntheticSelfName()
public void setSyntheticSelfName(java.lang.String name)
public void captureClosedReference()
public GoloFunction decoratedWith(java.lang.Object... decorators)
public boolean isDecorated()
public java.lang.String getDecoratorRef()
public void addDecorator(Decorator decorator)
public java.util.List<Decorator> getDecorators()
public boolean hasDecorators()
public GoloFunction createDecorator()
public ClosureReference asClosureReference()
public void relink(ReferenceTable table)
Scopepublic void relinkTopLevel(ReferenceTable table)
ScopeGo up in the hierarchy of parent scope, and set the root to the given table.
relinkTopLevel in interface Scopepublic java.lang.String toString()
toString in class java.lang.Objectpublic void accept(GoloIrVisitor visitor)
GoloElement
 This method should only call the visitor visitXXXX method.
 The children of this node will be visited by the
 GoloElement.walk(GoloIrVisitor) method.
accept in class GoloElementpublic void walk(GoloIrVisitor visitor)
GoloElementwalk in class GoloElementprotected void replaceElement(GoloElement original, GoloElement newElement)
GoloElement
 Replace original with newElement if original is a child of this node
 and type matches.
replaceElement in class GoloElementoriginal - the original value to replace. Must be a child of this nodenewElement - the element to replace with. Type must match.GoloElement.cantReplace(), 
GoloElement.cantReplace(GoloElement, GoloElement), 
GoloElement.doesNotContain(GoloElement), 
GoloElement.cantConvert(String, Object)public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object