java.lang.Object
ortus.boxlang.compiler.ast.BoxNode
ortus.boxlang.compiler.ast.BoxStatement
ortus.boxlang.compiler.ast.statement.component.BoxComponent
All Implemented Interfaces:
BoxVisitable

public class BoxComponent extends BoxStatement
Represents a tag or script component
  • Field Details

    • requiresBody

      public Boolean 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 component
      attributes - list of the annotations
      position - position within the source code
      sourceText - 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 component
      attributes - list of the annotations
      body - list of the statements nodes
      position - position within the source code
      sourceText - 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 component
      attributes - list of the annotations
      body - list of the statements nodes
      sourceStartIndex - the start index of the source code
      position - position within the source code
      sourceText - source code
      See Also:
  • Method Details

    • getBody

      public List<BoxStatement> getBody()
    • getAttributes

      public List<BoxAnnotation> getAttributes()
    • getName

      public String getName()
    • getSourceStartIndex

      public int getSourceStartIndex()
    • setSourceStartIndex

      public void setSourceStartIndex(int sourceStartIndex)
    • setBody

      public void setBody(List<BoxStatement> body)
    • setRequiresBody

      public void setRequiresBody(Boolean requiresBody)
    • getRequiresBody

      public Boolean getRequiresBody()
    • setAttributes

      public void setAttributes(List<BoxAnnotation> attributes)
    • setName

      public void setName(String name)
    • toMap

      public Map<String,Object> toMap()
      Overrides:
      toMap in class BoxNode
    • accept

      public void accept(VoidBoxVisitor v)
      Description copied from interface: BoxVisitable
      Accept method for visitor support.
      Parameters:
      v - the visitor implementation
    • accept

      public BoxNode accept(ReplacingBoxVisitor v)
      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