/** * Performs the injection. * * @param context * The current valid {@link ExecutionContext} * @throws RuleExecutionException * If injection fails. * @see ExecutionContext Throws: RuleExecutionException if an exception soccurs */ public void execute(ExecutionContext context) throws RuleExecutionException { Object toInject = determineValueToInject(context); try { getInjectee().set(context.getInstance(), toInject); } catch (IllegalAccessException e) { throw new RuleExecutionException("Failed to injected \'" + toInject + "\' to \'" + getInjectee().getName() + "\'", context, e); } }