public ValueExpression getValueBinding() { //TODO: figure out some way to cache this!! return Expressions.instance().createValueExpression(expression); } public ScopeType getScope()
protected void initDefaultMessages() { Expressions expressions = new Expressions(); if (createdMessage == null) { createdMessage = expressions.createValueExpression("Successfully created"); } if (updatedMessage == null) { updatedMessage = expressions.createValueExpression("Successfully updated"); } if (deletedMessage == null) { deletedMessage = expressions.createValueExpression("Successfully deleted"); } }
public MethodExpression getMethodBinding() { //TODO: figure out some way to cache this!! return Expressions.instance().createMethodExpression(expression); } public ValueExpression getValueBinding()
private static Action parseAction(Element element, String actionAtt, boolean conditionalsAllowed) { Action action = new Action(); String methodExpression = element.attributeValue(actionAtt); if (methodExpression==null) return null; if ( methodExpression.startsWith("#{") ) { action.setMethodExpression( Expressions.instance().createMethodExpression(methodExpression) ); } else { action.setOutcome(methodExpression); } if (conditionalsAllowed) { String expression = element.attributeValue("if"); if (expression!=null) { action.setValueExpression( Expressions.instance().createValueExpression(expression) ); } action.setOnPostback(!"false".equals(element.attributeValue("on-postback"))); } return action; }
if (line.length > 0) { System.out.println("Processing string " + args[0]); calc = new Expressions(new Scanner(args[0])); } else { System.out.print("Enter the Expression(% to break): "); calc = new Expressions(new Scanner(console.nextLine())); //System.in }
private javax.el.ValueExpression createExpression() { return getExpressionFactory().createValueExpression( getELContext(), expression, type ); }
/** * Create a method expression. * * @param expression a JBoss EL method expression */ public MethodExpression<Object> createMethodExpression(String expression) { return createMethodExpression(expression, Object.class); }
/** * Create a value expression. * * @param expression a JBoss EL value expression */ public ValueExpression<Object> createValueExpression(String expression) { return createValueExpression(expression, Object.class); }
public T getValue() { return (T) toUnifiedValueExpression().getValue( getELContext() ); }
public javax.el.MethodExpression toUnifiedMethodExpression() { if ( isFacesContextActive() ) { if (facesMethodExpression==null) { facesMethodExpression = createExpression(); } return facesMethodExpression; } else { if (seamMethodExpression==null) { seamMethodExpression = createExpression(); } return seamMethodExpression; } }
checkELExpression(expression);
if (args.length > 0) { <--- args instead of line System.out.println("Processing string " + args[0]); calc = new Expressions(new Scanner(args[0])); } else { System.out.print("Enter the Expression(% to break): "); calc = new Expressions(new Scanner(console.nextLine())); //System.in }
private javax.el.MethodExpression createExpression() { return getExpressionFactory().createMethodExpression( getELContext(), expression, type, argTypes ); }
/** * Get an appropriate ELContext. If there is an active JSF request, * use JSF's ELContext. Otherwise, use one that we created. */ @Override public ELContext getELContext() { return isFacesContextActive() ? FacesContext.getCurrentInstance().getELContext() : super.getELContext(); }
public javax.el.ValueExpression toUnifiedValueExpression() { if ( isFacesContextActive() ) { if (facesValueExpression==null) { facesValueExpression = createExpression(); } return facesValueExpression; } else { if (seamValueExpression==null) { seamValueExpression = createExpression(); } return seamValueExpression; } }
checkELExpression(expression);
public NaturalConversationIdParameter(String name, String paramName, String expression) { this.name = name; this.parameterName = paramName; this.vb = expression != null ? Expressions.instance().createValueExpression(expression) : null; }
private MethodExpression createMethodExpression() { return Expressions.instance().createMethodExpression(expression); }
/** * A convenience method for registering the restrictions from Strings. This * method is primarily intended to be used from Java, not to expose a bean * property for component configuration. Use setRestrictions() for the later. */ public void setRestrictionExpressionStrings(List<String> expressionStrings) { Expressions expressions = new Expressions(); List<ValueExpression> restrictionVEs = new ArrayList<ValueExpression>(expressionStrings.size()); for (String expressionString : expressionStrings) { restrictionVEs.add(expressions.createValueExpression(expressionString)); } setRestrictions(restrictionVEs); }
while (!line.isEmpty()) { if (line.equals("%")) { break; } calc = new Expressions(new Scanner(line)); System.out.println("\nInput as prefix expression:"); calc.showPreFix(); System.out.println("Result: " + calc.evaluate()); System.out.println("infix expression:"); calc.showInFix(); System.out.println("..................................................."); System.out.print("Enter the Expression(% to break): "); line = console.nextLine(); }