Class TemplateOptionTree

java.lang.Object
org.antlr.runtime.tree.BaseTree
org.antlr.runtime.tree.CommonTree
org.btrplace.btrpsl.tree.BtrPlaceTree
org.btrplace.btrpsl.tree.TemplateOptionTree
All Implemented Interfaces:
org.antlr.runtime.tree.Tree

public class TemplateOptionTree
extends BtrPlaceTree
A tree to get an option identifier and, if exists, the value of the option.
Author:
Fabien Hermenier
  • Field Summary

    Fields inherited from class org.btrplace.btrpsl.tree.BtrPlaceTree

    errors

    Fields inherited from class org.antlr.runtime.tree.CommonTree

    childIndex, parent, startIndex, stopIndex, token

    Fields inherited from class org.antlr.runtime.tree.BaseTree

    children

    Fields inherited from interface org.antlr.runtime.tree.Tree

    INVALID_NODE
  • Constructor Summary

    Constructors 
    Constructor Description
    TemplateOptionTree​(org.antlr.runtime.Token t, ErrorReporter errs)
    Make a new tree.
  • Method Summary

    Modifier and Type Method Description
    String getKey()
    Get the identifier of the option.
    String getValue()
    Get the optional value attached to the option identifier.
    BtrpOperand go​(BtrPlaceTree parent)
    Parse the root of the tree.

    Methods inherited from class org.btrplace.btrpsl.tree.BtrPlaceTree

    append, getChild, ignoreError, ignoreError, ignoreError, ignoreErrors

    Methods inherited from class org.antlr.runtime.tree.CommonTree

    dupNode, getCharPositionInLine, getChildIndex, getLine, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries, toString

    Methods inherited from class org.antlr.runtime.tree.BaseTree

    addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, freshenParentAndChildIndexesDeeply, freshenParentAndChildIndexesDeeply, getAncestor, getAncestors, getChildCount, getChildren, getFirstChildWithType, hasAncestor, insertChild, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, toStringTree

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TemplateOptionTree

      public TemplateOptionTree​(org.antlr.runtime.Token t, ErrorReporter errs)
      Make a new tree.
      Parameters:
      t - the token to handle. The root of this tree
      errs - the errors to report
  • Method Details

    • go

      public BtrpOperand go​(BtrPlaceTree parent)
      Description copied from class: BtrPlaceTree
      Parse the root of the tree.
      Overrides:
      go in class BtrPlaceTree
      Parameters:
      parent - the parent of the root
      Returns:
      a content
    • getKey

      public String getKey()
      Get the identifier of the option.
      Returns:
      a non empty string
    • getValue

      public String getValue()
      Get the optional value attached to the option identifier.
      Returns:
      the value if it was specified. null otherwise