Class BoxClosure
java.lang.Object
ortus.boxlang.compiler.ast.BoxNode
ortus.boxlang.compiler.ast.BoxExpression
ortus.boxlang.compiler.ast.expression.BoxClosure
- All Implemented Interfaces:
BoxVisitable
Represent A closure declaration
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBoxClosure
(List<BoxArgumentDeclaration> args, List<BoxAnnotation> annotations, BoxStatement body, Position position, String sourceText) Creates a Closure AST node -
Method Summary
Modifier and TypeMethodDescriptionAccept method for replacing visitor support.void
Accept method for visitor support.getArgs()
getBody()
void
setAnnotations
(List<BoxAnnotation> annotations) void
setArgs
(List<BoxArgumentDeclaration> args) void
setBody
(BoxStatement body) toMap()
Methods inherited from class ortus.boxlang.compiler.ast.BoxExpression
isLiteral
Methods inherited from class ortus.boxlang.compiler.ast.BoxNode
addComment, associateComments, endsOnSameLineAs, enumToMap, getAncestors, getChildren, getComments, getDescendants, getDescendantsOfType, getDescendantsOfType, getDescription, getDocComment, getFirstAncestorOfType, getFirstAncestorOfType, getFirstNodeOfType, getFirstNodeOfType, getFirstNodeOfTypes, getParent, getPosition, getSourceText, isAfter, isBefore, isInside, replaceChildren, replaceChildren, setComments, setParent, setPosition, setSourceText, startsOnEndLineOf, toJSON, toString
-
Constructor Details
-
BoxClosure
public BoxClosure(List<BoxArgumentDeclaration> args, List<BoxAnnotation> annotations, BoxStatement body, Position position, String sourceText) Creates a Closure AST node- Parameters:
args
- argumentsannotations
- annotationsbody
- body of the closureposition
- position of the statement in the source codesourceText
- source code that originated the Node
-
-
Method Details
-
getArgs
-
getAnnotations
-
getBody
-
setArgs
-
setAnnotations
-
setBody
-
toMap
-
accept
Description copied from interface:BoxVisitable
Accept method for visitor support.- Parameters:
v
- the visitor implementation
-
accept
Description copied from interface:BoxVisitable
Accept method for replacing visitor support. Each accept returns the node, or a replacement node.- Parameters:
v
- the visitor implementation
-