Class BoxComponent
java.lang.Object
ortus.boxlang.compiler.ast.BoxNode
ortus.boxlang.compiler.ast.BoxStatement
ortus.boxlang.compiler.ast.statement.component.BoxComponent
- All Implemented Interfaces:
BoxVisitable
Represents a tag or script component
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBoxComponent
(String name, List<BoxAnnotation> attributes, List<BoxStatement> body, int sourceStartIndex, Position position, String sourceText) Create an AST for a componentBoxComponent
(String name, List<BoxAnnotation> attributes, List<BoxStatement> body, Position position, String sourceText) Create an AST for a componentBoxComponent
(String name, List<BoxAnnotation> attributes, Position position, String sourceText) Create an AST for a component -
Method Summary
Modifier and TypeMethodDescriptionAccept method for replacing visitor support.void
Accept method for visitor support.getBody()
getName()
int
void
setAttributes
(List<BoxAnnotation> attributes) void
setBody
(List<BoxStatement> body) void
void
setRequiresBody
(Boolean requiresBody) void
setSourceStartIndex
(int sourceStartIndex) toMap()
Methods inherited from class ortus.boxlang.compiler.ast.BoxNode
addComment, associateComments, endsOnSameLineAs, enumToMap, getAncestors, getChildren, getComments, getDescendants, getDescendantsOfType, getDocComment, getFirstAncestorOfType, getFirstAncestorOfType, getFirstNodeOfType, getFirstNodeOfType, getFirstNodeOfTypes, getParent, getPosition, getSourceText, isAfter, isBefore, isInside, replaceChildren, replaceChildren, setComments, setParent, setPosition, setSourceText, startsOnEndLineOf, toJSON, toString
-
Field Details
-
requiresBody
-
-
Constructor Details
-
BoxComponent
public BoxComponent(String name, List<BoxAnnotation> attributes, Position position, String sourceText) Create an AST for a component- Parameters:
name
- name of the componentattributes
- list of the annotationsposition
- position within the source codesourceText
- source code- See Also:
-
BoxComponent
public BoxComponent(String name, List<BoxAnnotation> attributes, List<BoxStatement> body, Position position, String sourceText) Create an AST for a component- Parameters:
name
- name of the componentattributes
- list of the annotationsbody
- list of the statements nodesposition
- position within the source codesourceText
- source code- See Also:
-
BoxComponent
public BoxComponent(String name, List<BoxAnnotation> attributes, List<BoxStatement> body, int sourceStartIndex, Position position, String sourceText) Create an AST for a component- Parameters:
name
- name of the componentattributes
- list of the annotationsbody
- list of the statements nodessourceStartIndex
- the start index of the source codeposition
- position within the source codesourceText
- source code- See Also:
-
-
Method Details
-
getBody
-
getAttributes
-
getName
-
getSourceStartIndex
public int getSourceStartIndex() -
setSourceStartIndex
public void setSourceStartIndex(int sourceStartIndex) -
setBody
-
setRequiresBody
-
getRequiresBody
-
setAttributes
-
setName
-
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
-