Package com.getperka.flatpack.policy.pst

Examples of com.getperka.flatpack.policy.pst.PolicyNode


   * Tweak the value-stack push method to record the line number on which the current rule started.
   */
  @Override
  public boolean push(Object value) {
    if (value instanceof PolicyNode) {
      PolicyNode x = (PolicyNode) value;
      int startIndex = getContext().getStartIndex();
      x.setLineNumber(getContext().getInputBuffer().getPosition(startIndex).line);
    }
    return super.push(value);
  }
View Full Code Here


  protected String summarizeLocation() {
    if (location.isEmpty()) {
      return null;
    }
    PolicyNode node = location.peek();

    String toReturn = node.toString();

    if (node.getLineNumber() == -1) {
      toReturn += " (Unknown line)";
    } else {
      toReturn += " (Line " + node.getLineNumber() + ")";
    }
    return toReturn;
  }
View Full Code Here

TOP

Related Classes of com.getperka.flatpack.policy.pst.PolicyNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.