Examples of ASTLinkedList


Examples of org.mvel2.util.ASTLinkedList

        }
        return node instanceof BinaryOperation ? ((BooleanNode) node).getLeft().getAccessor() != null : node.getAccessor() != null;
    }

    private CompiledExpression asCompiledExpression(ASTNode node) {
        return new CompiledExpression(new ASTLinkedList(node), null, Object.class, parserConfiguration, false);
    }
View Full Code Here

Examples of org.mvel2.util.ASTLinkedList

        }
        return node instanceof BinaryOperation ? ((BooleanNode) node).getLeft().getAccessor() != null : node.getAccessor() != null;
    }

    private CompiledExpression asCompiledExpression(ASTNode node) {
        return new CompiledExpression(new ASTLinkedList(node), null, Object.class, parserConfiguration, false);
    }
View Full Code Here

Examples of org.mvel2.util.ASTLinkedList

        }
        return node instanceof BinaryOperation ? ((BooleanNode) node).getLeft().getAccessor() != null : node.getAccessor() != null;
    }

    private CompiledExpression asCompiledExpression(ASTNode node) {
        return new CompiledExpression(new ASTLinkedList(node), null, Object.class, parserConfiguration, false);
    }
View Full Code Here

Examples of org.mvel2.util.ASTLinkedList

        }
        return node instanceof BinaryOperation ? ((BooleanNode) node).getLeft().getAccessor() != null : node.getAccessor() != null;
    }

    private CompiledExpression asCompiledExpression(ASTNode node) {
        return new CompiledExpression(new ASTLinkedList(node), null, Object.class, parserConfiguration, false);
    }
View Full Code Here

Examples of org.mvel2.util.ASTLinkedList

  private static final class DecompileContext {
    public int node = 0;
  }

  private static String decompile(CompiledExpression cExp, boolean nest, DecompileContext context) {
    ASTIterator iter = new ASTLinkedList(cExp.getFirstNode());
    ASTNode tk;

    StringBuffer sbuf = new StringBuffer();

    if (!nest) {
      sbuf.append("Expression Decompile\n-------------\n");
    }

    while (iter.hasMoreNodes()) {
      sbuf.append("(").append(context.node++).append(") ");

      if ((tk = iter.nextNode()) instanceof NestedStatement
          && ((NestedStatement) tk).getNestedStatement() instanceof CompiledExpression) {
        //noinspection StringConcatenationInsideStringBufferAppend
        sbuf.append("NEST [" + tk.getClass().getSimpleName() + "]: { " + tk.getName() + " }\n");
        sbuf.append(decompile((CompiledExpression) ((NestedStatement) tk).getNestedStatement(), true, context));
      }
View Full Code Here

Examples of org.mvel2.util.ASTLinkedList

    return "UNKNOWN_OPERATOR";
  }

  public static Class determineType(String name, CompiledExpression compiledExpression) {
    ASTIterator iter = new ASTLinkedList(compiledExpression.getFirstNode());
    ASTNode node;
    while (iter.hasMoreNodes()) {
      if (name.equals((node = iter.nextNode()).getName()) && node.isAssignment()) {
        return node.getEgressType();
      }
    }

    return null;
View Full Code Here

Examples of org.mvel2.util.ASTLinkedList

  private static final class DecompileContext {
    public int node = 0;
  }

  private static String decompile(CompiledExpression cExp, boolean nest, DecompileContext context) {
    ASTIterator iter = new ASTLinkedList(cExp.getFirstNode());
    ASTNode tk;

    StringBuffer sbuf = new StringBuffer();

    if (!nest) {
      sbuf.append("Expression Decompile\n-------------\n");
    }

    while (iter.hasMoreNodes()) {
      sbuf.append("(").append(context.node++).append(") ");

      if ((tk = iter.nextNode()) instanceof NestedStatement
          && ((NestedStatement) tk).getNestedStatement() instanceof CompiledExpression) {
        //noinspection StringConcatenationInsideStringBufferAppend
        sbuf.append("NEST [" + tk.getClass().getSimpleName() + "]: { " + tk.getName() + " }\n");
        sbuf.append(decompile((CompiledExpression) ((NestedStatement) tk).getNestedStatement(), true, context));
      }
View Full Code Here

Examples of org.mvel2.util.ASTLinkedList

    return "UNKNOWN_OPERATOR";
  }

  public static Class determineType(String name, CompiledExpression compiledExpression) {
    ASTIterator iter = new ASTLinkedList(compiledExpression.getFirstNode());
    ASTNode node;
    while (iter.hasMoreNodes()) {
      if (name.equals((node = iter.nextNode()).getName()) && node.isAssignment()) {
        return node.getEgressType();
      }
    }

    return null;
View Full Code Here

Examples of org.mvel2.util.ASTLinkedList

        }
        return node instanceof BinaryOperation ? ((BinaryOperation)node).getLeft().getAccessor() != null : node.getAccessor() != null;
    }

    private CompiledExpression asCompiledExpression(ASTNode node) {
        return new CompiledExpression(new ASTLinkedList(node), null, Object.class, parserContext, false);
    }
View Full Code Here

Examples of org.mvel2.util.ASTLinkedList

        }
        return node instanceof BinaryOperation ? ((BooleanNode) node).getLeft().getAccessor() != null : node.getAccessor() != null;
    }

    private CompiledExpression asCompiledExpression(ASTNode node) {
        return new CompiledExpression(new ASTLinkedList(node), null, Object.class, parserConfiguration, false);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.