Package org.springframework.expression

Examples of org.springframework.expression.MethodExecutor.execute()


    // trickier:
    args.set(0, TypeDescriptor.forObject(12));
    args.add(TypeDescriptor.forObject(23f));
    me = new ReflectiveMethodResolver().resolve(emptyEvalContext, ru, "bar", args);
    me.execute(emptyEvalContext, ru, 12, 23f);
  }


  public class ReflectionUtil<T extends Number> {
View Full Code Here


    }

    MethodExecutor executorToUse = this.cachedExecutor;
    if (executorToUse != null) {
      try {
        return executorToUse.execute(
            state.getEvaluationContext(), state.getActiveContextObject().getValue(), arguments);
      }
      catch (AccessException ae) {
        // Two reasons this can occur:
        // 1. the method invoked actually threw a real exception
View Full Code Here

    // either there was no accessor or it no longer existed
    executorToUse = findAccessorForMethod(this.name, getTypes(arguments), state);
    this.cachedExecutor = executorToUse;
    try {
      return executorToUse.execute(
          state.getEvaluationContext(), state.getActiveContextObject().getValue(), arguments);
    } catch (AccessException ae) {
      throw new SpelEvaluationException( getStartPosition(), ae, SpelMessage.EXCEPTION_DURING_METHOD_INVOCATION,
          this.name, state.getActiveContextObject().getValue().getClass().getName(), ae.getMessage());
    }
View Full Code Here

    }

    MethodExecutor executorToUse = this.cachedExecutor;
    if (executorToUse != null) {
      try {
        return executorToUse.execute(
            state.getEvaluationContext(), state.getActiveContextObject().getValue(), arguments);
      }
      catch (AccessException ae) {
        // Two reasons this can occur:
        // 1. the method invoked actually threw a real exception
View Full Code Here

    // either there was no accessor or it no longer existed
    executorToUse = findAccessorForMethod(this.name, getTypes(arguments), state);
    this.cachedExecutor = executorToUse;
    try {
      return executorToUse.execute(
          state.getEvaluationContext(), state.getActiveContextObject().getValue(), arguments);
    } catch (AccessException ae) {
      // Same unwrapping exception handling as above in above catch block
      throwSimpleExceptionIfPossible(state, ae);
      throw new SpelEvaluationException( getStartPosition(), ae, SpelMessage.EXCEPTION_DURING_METHOD_INVOCATION,
View Full Code Here

    }

    MethodExecutor executorToUse = getCachedExecutor(evaluationContext, value, targetType, argumentTypes);
    if (executorToUse != null) {
      try {
        return executorToUse.execute(evaluationContext, value, arguments);
      }
      catch (AccessException ex) {
        // Two reasons this can occur:
        // 1. the method invoked actually threw a real exception
        // 2. the method invoked was not passed the arguments it expected and
View Full Code Here

    // either there was no accessor or it no longer existed
    executorToUse = findAccessorForMethod(this.name, argumentTypes, value, evaluationContext);
    this.cachedExecutor = new CachedMethodExecutor(
        executorToUse, (value instanceof Class ? (Class<?>) value : null), targetType, argumentTypes);
    try {
      return executorToUse.execute(evaluationContext, value, arguments);
    }
    catch (AccessException ex) {
      // Same unwrapping exception handling as above in above catch block
      throwSimpleExceptionIfPossible(value, ex);
      throw new SpelEvaluationException(getStartPosition(), ex,
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.