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) |
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) |
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) |
GoloFunction |
withParameters(java.util.Collection<java.lang.String> names) |
GoloFunction |
withParameters(java.lang.String... names) |
of
cantConvert, cantReplace, cantReplace, doesNotContain, getASTNode, getDocumentation, getLocalReferenceTable, getParentNode, getPositionInSourceCode, hasASTNode, makeParentOf, replaceInParentBy, setASTNode, setParentNode
public GoloFunction ofAST(GoloASTNode n)
ofAST
in class GoloElement
public 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 Block getBlock()
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)
Scope
public void relinkTopLevel(ReferenceTable table)
Scope
Go up in the hierarchy of parent scope, and set the root to the given table.
relinkTopLevel
in interface Scope
public java.lang.String toString()
toString
in class java.lang.Object
public void accept(GoloIrVisitor visitor)
accept
in class GoloElement
public void walk(GoloIrVisitor visitor)
walk
in class GoloElement
protected void replaceElement(GoloElement original, GoloElement newElement)
replaceElement
in class GoloElement
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object