current_priority = x; if (last_priority < current_priority) { i++; Operations operation = Operations.fromSymbol(opSymbol); first_operand = operation.create(first_operand, parse(expression, current_priority)); ....
/** * Return the underlying {@link OperationBuilder} */ public DefaultOperationBuilder getOperationBuilder() { if (operation == null) operation = Operations.create(); else if (!(operation instanceof DefaultOperationBuilder)) operation = Operations.wrap(operation); return (DefaultOperationBuilder) operation; }
/** * Perform the given {@link Operation} when the conditions set in this {@link Rule} are met. */ public RuleBuilder perform(final Operation operation) { if (this.operation == null) this.operation = operation; else if (operation instanceof OperationBuilder) this.operation = ((OperationBuilder) this.operation).and(operation); else this.operation = Operations.wrap(this.operation).and(operation); return this; }
@Override public void process(MethodContext context, RequestAction annotation, HandlerChain chain) { // create an Operation for executing this method Method method = context.getJavaMethod(); El el = El.retrievalMethod(context.getJavaClass(), method.getName()); Operation plainOperation = Invoke.binding(el); // let subsequent handlers enrich the operation context.put(Operation.class, plainOperation); chain.proceed(); Operation enrichedOperation = (Operation) context.get(Operation.class); Assert.notNull(enrichedOperation, "Operation was removed from the context"); // append this operation to the rule context.getRuleBuilder().perform(Operations.onInbound(enrichedOperation)); }
/** * Perform the given {@link Operation} when the conditions set in this {@link Rule} are met. */ public RuleBuilder perform(final Operation operation) { if (this.operation == null) this.operation = operation; else if (operation instanceof OperationBuilder) this.operation = ((OperationBuilder) this.operation).and(operation); else this.operation = Operations.wrap(this.operation).and(operation); return this; }
@Override public void process(MethodContext context, RequestAction annotation, HandlerChain chain) { // create an Operation for executing this method Method method = context.getJavaMethod(); El el = El.retrievalMethod(context.getJavaClass(), method.getName()); Operation plainOperation = Invoke.binding(el); // let subsequent handlers enrich the operation context.put(Operation.class, plainOperation); chain.proceed(); Operation enrichedOperation = (Operation) context.get(Operation.class); Assert.notNull(enrichedOperation, "Operation was removed from the context"); // append this operation to the rule context.getRuleBuilder().perform(Operations.onInbound(enrichedOperation)); }
/** * Wrap a given {@link Operation} as a new {@link DefaultOperationBuilder} that performs the action of the original * {@link Operation} when {@link #perform(Rewrite, EvaluationContext)} is invoked. */ public static OperationBuilder wrap(final Operation operation) { if (operation == null) return create(); if (operation instanceof OperationBuilder) return (OperationBuilder) operation; return new DefaultOperationBuilderInternal(operation) { @Override public void perform(Rewrite event, EvaluationContext context) { operation.perform(event, context); } }; }
/** * Return the underlying {@link OperationBuilder} */ public DefaultOperationBuilder getOperationBuilder() { if (operation == null) operation = Operations.create(); else if (!(operation instanceof DefaultOperationBuilder)) operation = Operations.wrap(operation); return (DefaultOperationBuilder) operation; }
/** * Wrap a given {@link Operation} as a new {@link DefaultOperationBuilder} that performs the action of the original * {@link Operation} when {@link #perform(Rewrite, EvaluationContext)} is invoked. */ public static OperationBuilder wrap(final Operation operation) { if (operation == null) return create(); if (operation instanceof OperationBuilder) return (OperationBuilder) operation; return new DefaultOperationBuilderInternal(operation) { @Override public void perform(Rewrite event, EvaluationContext context) { operation.perform(event, context); } }; }
@Override public Operation processElement(ParserContext handlerManager, Element element) throws ConfigurationException { OperationBuilder result = Operations.create(); List<Element> children = $(element).children().get(); for (Element child : children) { Operation operation = handlerManager.processElement(child); result = result.and(operation); } return result; } }
@Override public Operation processElement(ParserContext handlerManager, Element element) throws ConfigurationException { OperationBuilder result = Operations.create(); List<Element> children = $(element).children().get(); for (Element child : children) { Operation operation = handlerManager.processElement(child); result = result.and(operation); } return result; } }
@Override public Operation processElement(ParserContext handlerManager, Element element) throws ConfigurationException { OperationBuilder result = Operations.create(); List<Element> children = $(element).children().get(); for (Element child : children) { Operation operation = handlerManager.processElement(child); result = result.and(operation); } return result; } }
@Override public Operation processElement(ParserContext handlerManager, Element element) throws ConfigurationException OperationBuilder result = Operations.create(); List<Element> children = $(element).children().get(); for (Element child : children)
@Override public Operation processElement(ParserContext handlerManager, Element element) throws ConfigurationException OperationBuilder result = Operations.create(); List<Element> children = $(element).children().get(); for (Element child : children)