/** * Go through the list of registered constructor resolvers and see if any can find a * constructor that takes the specified set of arguments. * @param typeName the type trying to be constructed * @param argumentTypes the types of the arguments supplied that the constructor must take * @param state the current state of the expression * @return a reusable ConstructorExecutor that can be invoked to run the constructor or null * @throws SpelEvaluationException if there is a problem locating the constructor */ private ConstructorExecutor findExecutorForConstructor(String typeName, List<TypeDescriptor> argumentTypes, ExpressionState state) throws SpelEvaluationException { EvaluationContext evalContext = state.getEvaluationContext(); List<ConstructorResolver> ctorResolvers = evalContext.getConstructorResolvers(); for (ConstructorResolver ctorResolver : ctorResolvers) { try { ConstructorExecutor ce = ctorResolver.resolve(state.getEvaluationContext(), typeName, argumentTypes); if (ce != null) { return ce; } } catch (AccessException ex) { throw new SpelEvaluationException(getStartPosition(), ex, SpelMessage.CONSTRUCTOR_INVOCATION_PROBLEM, typeName, FormatHelper.formatMethodForMessage("", argumentTypes)); } } throw new SpelEvaluationException(getStartPosition(), SpelMessage.CONSTRUCTOR_NOT_FOUND, typeName, FormatHelper.formatMethodForMessage("", argumentTypes)); }
/** * Go through the list of registered constructor resolvers and see if any can find a * constructor that takes the specified set of arguments. * @param typeName the type trying to be constructed * @param argumentTypes the types of the arguments supplied that the constructor must take * @param state the current state of the expression * @return a reusable ConstructorExecutor that can be invoked to run the constructor or null * @throws SpelEvaluationException if there is a problem locating the constructor */ private ConstructorExecutor findExecutorForConstructor(String typeName, List<TypeDescriptor> argumentTypes, ExpressionState state) throws SpelEvaluationException { EvaluationContext evalContext = state.getEvaluationContext(); List<ConstructorResolver> ctorResolvers = evalContext.getConstructorResolvers(); for (ConstructorResolver ctorResolver : ctorResolvers) { try { ConstructorExecutor ce = ctorResolver.resolve(state.getEvaluationContext(), typeName, argumentTypes); if (ce != null) { return ce; } } catch (AccessException ex) { throw new SpelEvaluationException(getStartPosition(), ex, SpelMessage.CONSTRUCTOR_INVOCATION_PROBLEM, typeName, FormatHelper.formatMethodForMessage("", argumentTypes)); } } throw new SpelEvaluationException(getStartPosition(), SpelMessage.CONSTRUCTOR_NOT_FOUND, typeName, FormatHelper.formatMethodForMessage("", argumentTypes)); }
public List<ConstructorResolver> getConstructorResolvers() { return this.delegate.getConstructorResolvers(); }
public List<ConstructorResolver> getConstructorResolvers() { return this.delegate.getConstructorResolvers(); }
public List<ConstructorResolver> getConstructorResolvers() { return this.delegate.getConstructorResolvers(); }
public List<ConstructorResolver> getConstructorResolvers() { return delegate.getConstructorResolvers(); }
public List<ConstructorResolver> getConstructorResolvers() { return this.delegate.getConstructorResolvers(); }
public List<ConstructorResolver> getConstructorResolvers() { return delegate.getConstructorResolvers(); }
@Override public List<ConstructorResolver> getConstructorResolvers() { return this.delegate.getConstructorResolvers(); }
public List<ConstructorResolver> getConstructorResolvers() { return this.delegate.getConstructorResolvers(); }
/** * Go through the list of registered constructor resolvers and see if any can find a * constructor that takes the specified set of arguments. * @param typeName the type trying to be constructed * @param argumentTypes the types of the arguments supplied that the constructor must take * @param state the current state of the expression * @return a reusable ConstructorExecutor that can be invoked to run the constructor or null * @throws SpelEvaluationException if there is a problem locating the constructor */ private ConstructorExecutor findExecutorForConstructor(String typeName, List<TypeDescriptor> argumentTypes, ExpressionState state) throws SpelEvaluationException { EvaluationContext evalContext = state.getEvaluationContext(); List<ConstructorResolver> ctorResolvers = evalContext.getConstructorResolvers(); for (ConstructorResolver ctorResolver : ctorResolvers) { try { ConstructorExecutor ce = ctorResolver.resolve(state.getEvaluationContext(), typeName, argumentTypes); if (ce != null) { return ce; } } catch (AccessException ex) { throw new SpelEvaluationException(getStartPosition(), ex, SpelMessage.CONSTRUCTOR_INVOCATION_PROBLEM, typeName, FormatHelper.formatMethodForMessage("", argumentTypes)); } } throw new SpelEvaluationException(getStartPosition(), SpelMessage.CONSTRUCTOR_NOT_FOUND, typeName, FormatHelper.formatMethodForMessage("", argumentTypes)); }