Package org.springframework.expression

Examples of org.springframework.expression.TypedValue


    return ast.getValue(expressionState);
  }

  public <T> T getValue(Class<T> expectedResultType) throws EvaluationException {
    ExpressionState expressionState = new ExpressionState(getEvaluationContext(), configuration);
    TypedValue typedResultValue = ast.getTypedValue(expressionState);
    return ExpressionUtils.convertTypedValue(expressionState.getEvaluationContext(), typedResultValue, expectedResultType);
  }
View Full Code Here


    return ExpressionUtils.convertTypedValue(expressionState.getEvaluationContext(), typedResultValue, expectedResultType);
  }

  public <T> T getValue(Object rootObject, Class<T> expectedResultType) throws EvaluationException {
    ExpressionState expressionState = new ExpressionState(getEvaluationContext(), toTypedValue(rootObject), configuration);
    TypedValue typedResultValue = ast.getTypedValue(expressionState);
    return ExpressionUtils.convertTypedValue(expressionState.getEvaluationContext(), typedResultValue, expectedResultType);
  }
View Full Code Here

    Assert.notNull(context, "The EvaluationContext is required");
    return ast.getValue(new ExpressionState(context, toTypedValue(rootObject), configuration));
  }

  public <T> T getValue(EvaluationContext context, Class<T> expectedResultType) throws EvaluationException {
    TypedValue typedResultValue = ast.getTypedValue(new ExpressionState(context, configuration));
    return ExpressionUtils.convertTypedValue(context, typedResultValue, expectedResultType);
  }
View Full Code Here

    TypedValue typedResultValue = ast.getTypedValue(new ExpressionState(context, configuration));
    return ExpressionUtils.convertTypedValue(context, typedResultValue, expectedResultType);
  }
 
  public <T> T getValue(EvaluationContext context, Object rootObject, Class<T> expectedResultType) throws EvaluationException {
    TypedValue typedResultValue = ast.getTypedValue(new ExpressionState(context, toTypedValue(rootObject), configuration));
    return ExpressionUtils.convertTypedValue(context, typedResultValue, expectedResultType);
  }
View Full Code Here

  private TypedValue toTypedValue(Object object) {
    if (object == null) {
      return TypedValue.NULL;
    }
    else {
      return new TypedValue(object);
    }
  }
View Full Code Here

    setRootObject(rootObject);
  }


  public void setRootObject(Object rootObject, TypeDescriptor typeDescriptor) {
    this.rootObject = new TypedValue(rootObject, typeDescriptor);
  }
View Full Code Here

  public void setRootObject(Object rootObject, TypeDescriptor typeDescriptor) {
    this.rootObject = new TypedValue(rootObject, typeDescriptor);
  }

  public void setRootObject(Object rootObject) {
    this.rootObject = (rootObject != null ? new TypedValue(rootObject) : TypedValue.NULL);
  }
View Full Code Here

      }
      if (this.ctor.isVarArgs()) {
        arguments = ReflectionHelper.setupArgumentsForVarargsInvocation(this.ctor.getParameterTypes(), arguments);
      }
      ReflectionUtils.makeAccessible(this.ctor);
      return new TypedValue(this.ctor.newInstance(arguments));
    }
    catch (Exception ex) {
      throw new AccessException("Problem invoking constructor: " + this.ctor, ex);
    }
  }
View Full Code Here

          constantList.add(((Literal) child).getLiteralValue().getValue());
        } else if (child instanceof InlineList) {
          constantList.add(((InlineList) child).getConstantValue());
        }
      }
      this.constant = new TypedValue(Collections.unmodifiableList(constantList));
    }
  }
View Full Code Here

      List<Object> returnValue = new ArrayList<Object>();
      int childcount = getChildCount();
      for (int c = 0; c < childcount; c++) {
        returnValue.add(getChild(c).getValue(expressionState));
      }
      return new TypedValue(returnValue);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.expression.TypedValue

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.