Class BoxFunctionDeclaration
java.lang.Object
ortus.boxlang.compiler.ast.BoxNode
ortus.boxlang.compiler.ast.BoxStatement
ortus.boxlang.compiler.ast.statement.BoxFunctionDeclaration
- All Implemented Interfaces:
IBoxDocumentableNode,BoxVisitable
AST Node representing a function definition
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBoxFunctionDeclaration(BoxAccessModifier accessModifier, List<BoxMethodDeclarationModifier> modifiers, String name, BoxReturnType type, List<BoxArgumentDeclaration> args, List<BoxAnnotation> annotations, List<BoxDocumentationAnnotation> documentation, List<BoxStatement> body, Position position, String sourceText) Creates the AST nodeBoxFunctionDeclaration(BoxAccessModifier accessModifier, List<BoxMethodDeclarationModifier> modifiers, String name, BoxReturnType type, List<BoxArgumentDeclaration> args, List<BoxAnnotation> annotations, List<BoxDocumentationAnnotation> documentation, Position position, String sourceText) -
Method Summary
Modifier and TypeMethodDescriptionAccept method for replacing visitor support.voidAccept method for visitor support.voidCalled when all comments are associated with the node, so it can process any doc comment contentsgetArgs()getBody()Get documentation from nodegetName()getType()voidsetAccessModifier(BoxAccessModifier accessModifier) voidsetAnnotations(List<BoxAnnotation> annotations) voidsetArgs(List<BoxArgumentDeclaration> args) voidsetBody(List<BoxStatement> body) voidsetDocumentation(List<BoxDocumentationAnnotation> documentation) Set documentation for nodevoidsetModifiers(List<BoxMethodDeclarationModifier> modifiers) voidvoidsetType(BoxReturnType type) toMap()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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ortus.boxlang.compiler.ast.IBoxDocumentableNode
getDocComment
-
Constructor Details
-
BoxFunctionDeclaration
public BoxFunctionDeclaration(BoxAccessModifier accessModifier, List<BoxMethodDeclarationModifier> modifiers, String name, BoxReturnType type, List<BoxArgumentDeclaration> args, List<BoxAnnotation> annotations, List<BoxDocumentationAnnotation> documentation, List<BoxStatement> body, Position position, String sourceText) Creates the AST node- Parameters:
accessModifier- public,private etcname- name of the functiontype- return typeargs- List of argumentsannotations- annotationsdocumentation- documentationbody- body of the functionposition- position of the statement in the source codesourceText- source code that originated the Node- See Also:
-
BoxFunctionDeclaration
public BoxFunctionDeclaration(BoxAccessModifier accessModifier, List<BoxMethodDeclarationModifier> modifiers, String name, BoxReturnType type, List<BoxArgumentDeclaration> args, List<BoxAnnotation> annotations, List<BoxDocumentationAnnotation> documentation, Position position, String sourceText)
-
-
Method Details
-
getAccessModifier
-
getModifiers
-
getName
-
getType
-
getArgs
-
getBody
-
getAnnotations
-
getDocumentation
Description copied from interface:IBoxDocumentableNodeGet documentation from node- Specified by:
getDocumentationin interfaceIBoxDocumentableNode- Returns:
- list of documentation annotations
-
setAccessModifier
-
setModifiers
-
setName
-
setType
-
setArgs
-
setBody
-
setAnnotations
-
setDocumentation
Description copied from interface:IBoxDocumentableNodeSet documentation for node- Specified by:
setDocumentationin interfaceIBoxDocumentableNode- Parameters:
documentation- list of documentation annotations
-
finalizeDocumentation
public void finalizeDocumentation()Called when all comments are associated with the node, so it can process any doc comment contents- Specified by:
finalizeDocumentationin interfaceIBoxDocumentableNode
-
toMap
-
accept
Description copied from interface:BoxVisitableAccept method for visitor support.- Specified by:
acceptin interfaceBoxVisitable- Parameters:
v- the visitor implementation
-
accept
Description copied from interface:BoxVisitableAccept method for replacing visitor support. Each accept returns the node, or a replacement node.- Specified by:
acceptin interfaceBoxVisitable- Parameters:
v- the visitor implementation
-