/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + (this.optional ? 1231 : 1237); result = (prime * result) + ((this.variableName == null) ? 0 : this.variableName.hashCode()); return result; }
/** * 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); } }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } TagInjection other = (TagInjection) obj; if (this.injectionStrategy != other.injectionStrategy) { return false; } if (this.type == null) { if (other.type != null) { return false; } } else if (!this.type.equals(other.type)) { return false; } return true; } }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } SessionVariableInjection other = (SessionVariableInjection) obj; if (this.optional != other.optional) { return false; } if (this.variableName == null) { if (other.variableName != null) { return false; } } else if (!this.variableName.equals(other.variableName)) { return false; } return true; } }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + ((this.injectionStrategy == null) ? 0 : this.injectionStrategy.hashCode()); result = (prime * result) + ((this.type == null) ? 0 : this.type.hashCode()); return result; }