Skip to content

Commit

Permalink
Injection cleanup part 4
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlloyd committed Jul 28, 2010
1 parent bb776d1 commit c844de8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
Expand Up @@ -39,16 +39,14 @@ protected DelegatingInjectionSource(InjectionSource delegate) {

@Override
protected <T> Value<?> getValue(Value<T> serviceValue, ServiceContainerImpl container) {
return getValue(delegate.getValue(serviceValue, container), serviceValue, container);
return getValue(delegate.getValue(serviceValue, container));
}

/**
* Contract method providing children with the value of the delegate InjectionSource.
*
* @param delegateValue The value from the delegate injection source
* @param serviceValue The service value
* @param container The service container
* @return The value of the injection source
*/
protected abstract <T> Value<?> getValue(Value<?> delegateValue, Value<T> serviceValue, ServiceContainerImpl container);
protected abstract <T> Value<?> getValue(Value<?> delegateValue);
}
Expand Up @@ -50,7 +50,7 @@ public FieldDelegatingInjectionSource(final InjectionSource delegate, final Stri
}

@Override
protected <T> Value<?> getValue(final Value<?> delegateValue, final Value<T> serviceValue, final ServiceContainerImpl container) {
protected <T> Value<?> getValue(final Value<?> delegateValue) {
return new FieldValue(getFieldValue(delegateValue), delegateValue);
}

Expand Down
Expand Up @@ -57,7 +57,7 @@ public MethodDelegatingInjectionSource(final InjectionSource delegate, final Val
}

@Override
protected <T> Value<?> getValue(final Value<?> delegateValue, final Value<T> serviceValue, final ServiceContainerImpl container) {
protected <T> Value<?> getValue(final Value<?> delegateValue) {
return new MethodValue<T>(getMethodValue(delegateValue), delegateValue, parameters);
}

Expand Down
Expand Up @@ -50,7 +50,7 @@ public PropertyDelegatingInjectionSource(final InjectionSource delegate, final V
}

@Override
protected <T> Value<?> getValue(final Value<?> delegateValue, final Value<T> serviceValue, final ServiceContainerImpl container) {
protected <T> Value<?> getValue(final Value<?> delegateValue) {
return new PropertyValue(getPropertyValue(delegateValue), delegateValue);
}

Expand Down
Expand Up @@ -41,6 +41,7 @@ public TranslatedInjectionDestination(InjectionDestination delegate, Translator<
this.translator = translator;
}

@SuppressWarnings({ "unchecked" })
@Override
protected <T> Injector<?> getInjector(Value<T> injectionValue) {
final Injector<O> delegateInjector = (Injector<O>) delegate.getInjector(injectionValue);
Expand Down

0 comments on commit c844de8

Please sign in to comment.