Class BoxAnnotation

java.lang.Object
ortus.boxlang.compiler.ast.BoxNode
ortus.boxlang.compiler.ast.statement.BoxAnnotation
All Implemented Interfaces:
BoxVisitable

public class BoxAnnotation extends BoxNode
There are two methods of adding annotations to BoxLang methods and arguments. The first is an inline key/value pairs on the method or argument declaration where the value is an empty string if left out, or can be any object literal.
  • Constructor Details

    • BoxAnnotation

      public BoxAnnotation(BoxFQN key, BoxExpression value, Position position, String sourceText)
      Creates an Annotation AST node
      Parameters:
      key - fqn of the annotation
      value - expression representing the value
      position - position of the statement in the source code
      sourceText - source code that originated the Node
  • Method Details

    • getKey

      public BoxFQN getKey()
    • getValue

      public BoxExpression getValue()
    • setKey

      public void setKey(BoxFQN key)
    • setValue

      public void setValue(BoxExpression value)
    • 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