package cucumber.runtime.java.test.injectionprovider;

import de.akquinet.jbosscc.needle.injection.InjectionProvider;
import de.akquinet.jbosscc.needle.injection.InjectionTargetInformation;

/**
 * Returns a value provider returning the value given in constructor.
 * 
 * @author Simon Zambrovski
 * 
 */
public class ValueInjectionProvider implements InjectionProvider<ValueGetter> {

    private final String value;

    public ValueInjectionProvider(String value) {
        this.value = value;
    }

    @Override
    public boolean verify(InjectionTargetInformation injectionTargetInformation) {
        return injectionTargetInformation.getType().isAssignableFrom(ValueGetter.class);
    }

    @Override
    public ValueGetter getInjectedObject(Class<?> injectionPointType) {
        return new ValueGetter() {
            @Override
            public String getValue() {
                return value;
            }
        };
    }

    @Override
    public Object getKey(InjectionTargetInformation injectionTargetInformation) {
        return ValueGetter.class;
    }

}

@@ -269,47 +269,8 @@
 r.%0D%0A
- * %0D%0A * @author Simon Zambrovski%0D%0A * %0D%0A
  */%0D
@@ -422,16 +422,22 @@
 rovider(
+final 
 String v
@@ -524,16 +524,22 @@
  verify(
+final 
 Injectio
@@ -743,16 +743,22 @@
 dObject(
+final 
 Class%3C?%3E
@@ -987,16 +987,22 @@
  getKey(
+final 
 Injectio

remove author tag