Author: shane.bryzak(a)jboss.com
Date: 2009-10-07 23:44:07 -0400 (Wed, 07 Oct 2009)
New Revision: 3880
Added:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/AbstractProducer.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Any.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/AtInjectTCK.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/BeanDisambiguator.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/DriversSeatProducer.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Plain.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Spare.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/SpareTireProducer.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/
Removed:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/
Modified:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotated.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedCallable.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedConstructor.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedField.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedMember.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedMethod.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedParameter.java
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedType.java
Log:
refactored tck-runner packages
Copied:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/AbstractProducer.java
(from rev 3872,
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/AbstractProducer.java)
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/AbstractProducer.java
(rev 0)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/AbstractProducer.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -0,0 +1,27 @@
+package org.jboss.weld.atinject.tck;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTarget;
+
+public class AbstractProducer<T>
+{
+
+ protected final InjectionTarget<T> injectionTarget;
+ protected final BeanManager beanManager;
+
+ public AbstractProducer(BeanManager beanManager, Class<T> type)
+ {
+ this.injectionTarget =
beanManager.createInjectionTarget(beanManager.createAnnotatedType(type));
+ this.beanManager = beanManager;
+ }
+
+ public T produce()
+ {
+ CreationalContext<T> ctx = beanManager.createCreationalContext(null);
+ T instance = injectionTarget.produce(ctx);
+ injectionTarget.inject(instance, ctx);
+ return instance;
+ }
+
+}
\ No newline at end of file
Copied: ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Any.java
(from rev 3872,
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/Any.java)
===================================================================
--- ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Any.java
(rev 0)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Any.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.weld.atinject.tck;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+/**
+ * A built-in binding type that is implicitly applied to all beans which do not
+ * have the {@link New} built-in binding type.
+ *
+ * @author Gavin King
+ * @author David Allen
+ */
+
+@Qualifier
+@Retention(RUNTIME)
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+public @interface Any
+{
+
+}
Copied:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/AtInjectTCK.java
(from rev 3872,
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/AtInjectTCK.java)
===================================================================
--- ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/AtInjectTCK.java
(rev 0)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/AtInjectTCK.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -0,0 +1,66 @@
+package org.jboss.weld.atinject.tck;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+
+import junit.framework.Test;
+
+import org.atinject.tck.Tck;
+import org.atinject.tck.auto.Car;
+import org.atinject.tck.auto.Convertible;
+import org.atinject.tck.auto.FuelTank;
+import org.atinject.tck.auto.Seat;
+import org.atinject.tck.auto.Tire;
+import org.atinject.tck.auto.V8Engine;
+import org.atinject.tck.auto.accessories.Cupholder;
+import org.atinject.tck.auto.accessories.SpareTire;
+import org.jboss.webbeans.mock.MockEELifecycle;
+import org.jboss.webbeans.mock.TestContainer;
+
+/**
+ * Configure the AtInject TCK for use with the 299 RI
+ *
+ * @author pmuir
+ *
+ */
+public class AtInjectTCK
+{
+ /**
+ * The classes that should be deployed as Managed Beans
+ */
+ public static final List<Class<?>> classes =
Arrays.<Class<?>>asList(
+ Convertible.class,
+ Seat.class,
+ V8Engine.class,
+ Cupholder.class,
+ FuelTank.class,
+ Tire.class,
+ SpareTire.class,
+ // Two producer method which allow us to expose SpareTire and Drivers seat with
qualifiers
+ DriversSeatProducer.class,
+ SpareTireProducer.class
+ );
+
+ /**
+ * Create JUnit TestSuite
+ *
+ * @return
+ */
+ public static Test suite()
+ {
+ // Create and start the TestContainer, which takes care of starting the container,
deploying the
+ // classes, starting the contexts etc.
+ TestContainer container = new TestContainer(new MockEELifecycle(), classes, null);
+ container.startContainer();
+
+ BeanManager beanManager = container.getBeanManager();
+
+ // Obtain a reference to the Car and pass it to the TCK to generate the testsuite
+ Bean<?> bean = beanManager.resolve(beanManager.getBeans(Car.class));
+ Car instance = (Car) beanManager.getReference(bean, Car.class,
beanManager.createCreationalContext(bean));
+
+ return Tck.testsFor(instance, false /* supportsStatic */, true /* supportsPrivate
*/);
+ }
+}
\ No newline at end of file
Copied:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/BeanDisambiguator.java
(from rev 3872,
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/BeanDisambiguator.java)
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/BeanDisambiguator.java
(rev 0)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/BeanDisambiguator.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -0,0 +1,413 @@
+package org.jboss.weld.atinject.tck;
+
+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.AnnotationLiteral;
+import javax.enterprise.inject.spi.AnnotatedConstructor;
+import javax.enterprise.inject.spi.AnnotatedField;
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.AnnotatedParameter;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.ProcessAnnotatedType;
+import javax.inject.Inject;
+
+import org.atinject.tck.auto.Convertible;
+import org.atinject.tck.auto.Tire;
+import org.jboss.weld.atinject.tck.util.ForwardingAnnotatedConstructor;
+import org.jboss.weld.atinject.tck.util.ForwardingAnnotatedField;
+import org.jboss.weld.atinject.tck.util.ForwardingAnnotatedMethod;
+import org.jboss.weld.atinject.tck.util.ForwardingAnnotatedParameter;
+import org.jboss.weld.atinject.tck.util.ForwardingAnnotatedType;
+
+public class BeanDisambiguator implements Extension
+{
+
+ private static final Annotation PLAIN_LITERAL = new AnnotationLiteral<Plain>()
+ {
+ };
+
+ /**
+ * Modufy the class metadata that 299 will use when building beans
+ */
+ public void observe(@Observes ProcessAnnotatedType<?> pat)
+ {
+ addPlainQualifierToTireBean(pat);
+ addPlainQualifierToConvertibleConstructor(pat);
+ addPlainQualifierToConvertiblePlainTireField(pat);
+ addPlainQualifierToConvertibleInjectInstanceMethodWithManyArgs(pat);
+ }
+
+ /**
+ * Adjust the injectInstanceMethodWithManyArgs injectable method on {@link
Convertible} so that parameters
+ * 2 and 6 ({@code plainTire} and {@code plainTireProvider}) additionally have the
@Plain annotation
+ */
+ private <X> void
addPlainQualifierToConvertibleInjectInstanceMethodWithManyArgs(ProcessAnnotatedType<X>
pat)
+ {
+ if (pat.getAnnotatedType().getJavaClass().equals(Convertible.class))
+ {
+ final AnnotatedType<X> original = pat.getAnnotatedType();
+
+ final Set<AnnotatedMethod<? super X>> methods = new
HashSet<AnnotatedMethod<? super X>>();
+ for (final AnnotatedMethod<? super X> method : original.getMethods())
+ {
+ if
(method.getJavaMember().getName().equals("injectInstanceMethodWithManyArgs"))
+ {
+ methods.add(qualifyParameterWithPlain(method, 2, 6));
+ }
+ else
+ {
+ methods.add(method);
+ }
+ }
+
+ pat.setAnnotatedType(new ForwardingAnnotatedType<X>()
+ {
+
+ @Override
+ protected AnnotatedType<X> delegate()
+ {
+ return original;
+ }
+
+ @Override
+ public Set<AnnotatedMethod<? super X>> getMethods()
+ {
+ return methods;
+ }
+
+ });
+ }
+ }
+
+
+ /**
+ * Add the @Plain qualifier to the field {@code fieldPlainTire} and @{code
fieldPlainTireProvider} of {@link Convertible}
+ *
+ */
+ private <X> void
addPlainQualifierToConvertiblePlainTireField(ProcessAnnotatedType<X> pat)
+ {
+ if (pat.getAnnotatedType().getJavaClass().equals(Convertible.class))
+ {
+ final AnnotatedType<X> original = pat.getAnnotatedType();
+
+ final Set<AnnotatedField<? super X>> fields = new
HashSet<AnnotatedField<? super X>>();
+
+ for (final AnnotatedField<? super X> field : original.getFields())
+ {
+ if (field.getJavaMember().getName().equals("fieldPlainTire") ||
field.getJavaMember().getName().equals("fieldPlainTireProvider"))
+ {
+ fields.add(addPlainQualifierToField(field));
+ }
+ else
+ {
+ fields.add(field);
+ }
+ }
+
+ pat.setAnnotatedType(new ForwardingAnnotatedType<X>()
+ {
+
+ @Override
+ public Set<AnnotatedField<? super X>> getFields()
+ {
+ return fields;
+ }
+
+ @Override
+ protected AnnotatedType<X> delegate()
+ {
+ return original;
+ }
+
+ });
+ }
+ }
+
+ /**
+ * Add the @Plain qualifier to the parameters 2 and 6 ({@code plainTire} and {@code
plainTireProvider}) of the constructor of {@link Convertible}
+ *
+ */
+ private <X> void
addPlainQualifierToConvertibleConstructor(ProcessAnnotatedType<X> pat)
+ {
+ if (pat.getAnnotatedType().getJavaClass().equals(Convertible.class))
+ {
+ final AnnotatedType<X> original = pat.getAnnotatedType();
+
+ final Set<AnnotatedConstructor<X>> constructors = new
HashSet<AnnotatedConstructor<X>>();
+ for (final AnnotatedConstructor<X> constructor :
original.getConstructors())
+ {
+ if (constructor.isAnnotationPresent(Inject.class))
+ {
+ constructors.add(qualifyParameterWithPlain(constructor, 2, 6));
+ }
+ else
+ {
+ constructors.add(constructor);
+ }
+ }
+
+ pat.setAnnotatedType(new ForwardingAnnotatedType<X>()
+ {
+
+ @Override
+ protected AnnotatedType<X> delegate()
+ {
+ return original;
+ }
+
+ @Override
+ public Set<AnnotatedConstructor<X>> getConstructors()
+ {
+ return constructors;
+ }
+
+ });
+ }
+ }
+
+ /**
+ * Add the @Plain annotation to the {@link Tire} class
+ *
+ */
+ private <X> void addPlainQualifierToTireBean(ProcessAnnotatedType<X> pat)
+ {
+ if (pat.getAnnotatedType().getJavaClass().equals(Tire.class))
+ {
+ final Set<Annotation> annotations = new HashSet<Annotation>();
+ annotations.addAll(pat.getAnnotatedType().getAnnotations());
+ annotations.add(PLAIN_LITERAL);
+ final AnnotatedType<X> original = pat.getAnnotatedType();
+ pat.setAnnotatedType(new ForwardingAnnotatedType<X>()
+ {
+
+ @Override
+ protected AnnotatedType<X> delegate()
+ {
+ return original;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public <A extends Annotation> A getAnnotation(Class<A>
annotationType)
+ {
+ if (annotationType.equals(Plain.class))
+ {
+ return (A) PLAIN_LITERAL;
+ }
+ else
+ {
+ return delegate().getAnnotation(annotationType);
+ }
+ }
+
+ @Override
+ public Set<Annotation> getAnnotations()
+ {
+ return annotations;
+ }
+
+ @Override
+ public boolean isAnnotationPresent(Class<? extends Annotation>
annotationType)
+ {
+ if (annotationType.equals(Plain.class))
+ {
+ return true;
+ }
+ else
+ {
+ return delegate().isAnnotationPresent(annotationType);
+ }
+ }
+
+ });
+ }
+ }
+
+ /**
+ * Utility method to add the @Plain qualifier to a list of parameters
+ */
+ private <X> List<AnnotatedParameter<X>>
qualifyParameterWithPlain(final List<AnnotatedParameter<X>> parameters,
Integer... position)
+ {
+ Collection<Integer> positions = Arrays.asList(position);
+ final List<AnnotatedParameter<X>> newParameters = new
ArrayList<AnnotatedParameter<X>>();
+
+ for (final AnnotatedParameter<X> parameter : parameters)
+ {
+ if (positions.contains(parameter.getPosition()))
+ {
+ newParameters.add(addPlainQualifierToParameter(parameter));
+ }
+ else
+ {
+ newParameters.add(parameter);
+ }
+ }
+
+ return newParameters;
+
+ }
+
+ /**
+ * Utility method to add the @Plain qualifier to a method
+ */
+ private <X> AnnotatedMethod<X> qualifyParameterWithPlain(final
AnnotatedMethod<X> method, Integer... position)
+ {
+ final List<AnnotatedParameter<X>> parameters =
qualifyParameterWithPlain(method.getParameters(), position);
+ return new ForwardingAnnotatedMethod<X>()
+ {
+
+ @Override
+ public List<AnnotatedParameter<X>> getParameters()
+ {
+ return parameters;
+ }
+
+ @Override
+ protected AnnotatedMethod<X> delegate()
+ {
+ return method;
+ }
+
+ };
+ }
+
+ /**
+ * Utility method to add the @Plain qualifier to a constructor
+ */
+ private <X> AnnotatedConstructor<X> qualifyParameterWithPlain(final
AnnotatedConstructor<X> constructor, Integer... position)
+ {
+ final List<AnnotatedParameter<X>> parameters =
qualifyParameterWithPlain(constructor.getParameters(), position);
+ return new ForwardingAnnotatedConstructor<X>()
+ {
+
+ @Override
+ public List<AnnotatedParameter<X>> getParameters()
+ {
+ return parameters;
+ }
+
+ @Override
+ protected AnnotatedConstructor<X> delegate()
+ {
+ return constructor;
+ }
+
+ };
+ }
+
+ /**
+ * Utility method to add the @Plain qualifier to a parameter
+ */
+ private <X> AnnotatedParameter<X> addPlainQualifierToParameter(final
AnnotatedParameter<X> parameter)
+ {
+ final Set<Annotation> annotations = new HashSet<Annotation>();
+ annotations.addAll(parameter.getAnnotations());
+ annotations.add(PLAIN_LITERAL);
+ return new ForwardingAnnotatedParameter<X>()
+ {
+
+ @Override
+ protected AnnotatedParameter<X> delegate()
+ {
+ return parameter;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public <A extends Annotation> A getAnnotation(Class<A>
annotationType)
+ {
+ if (annotationType.equals(Plain.class))
+ {
+ return (A) PLAIN_LITERAL;
+ }
+ else
+ {
+ return delegate().getAnnotation(annotationType);
+ }
+ }
+
+ @Override
+ public Set<Annotation> getAnnotations()
+ {
+ return annotations;
+ }
+
+ @Override
+ public boolean isAnnotationPresent(Class<? extends Annotation>
annotationType)
+ {
+ if (annotationType.equals(Plain.class))
+ {
+ return true;
+ }
+ else
+ {
+ return delegate().isAnnotationPresent(annotationType);
+ }
+ }
+
+ };
+ }
+
+ /**
+ * Utility method to add the @Plain qualifier to a field
+ */
+ private <X> AnnotatedField<X> addPlainQualifierToField(final
AnnotatedField<X> field)
+ {
+ final Set<Annotation> annotations = new HashSet<Annotation>();
+ annotations.addAll(field.getAnnotations());
+ annotations.add(PLAIN_LITERAL);
+ return new ForwardingAnnotatedField<X>()
+ {
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public <A extends Annotation> A getAnnotation(Class<A>
annotationType)
+ {
+ if (annotationType.equals(Plain.class))
+ {
+ return (A) PLAIN_LITERAL;
+ }
+ else
+ {
+ return delegate().getAnnotation(annotationType);
+ }
+ }
+
+ @Override
+ public Set<Annotation> getAnnotations()
+ {
+ return annotations;
+ }
+
+ @Override
+ public boolean isAnnotationPresent(Class<? extends Annotation>
annotationType)
+ {
+ if (annotationType.equals(Plain.class))
+ {
+ return true;
+ }
+ else
+ {
+ return delegate().isAnnotationPresent(annotationType);
+ }
+ }
+
+ @Override
+ protected AnnotatedField<X> delegate()
+ {
+ return field;
+ }
+
+ };
+ }
+
+
+}
Copied:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/DriversSeatProducer.java
(from rev 3872,
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/DriversSeatProducer.java)
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/DriversSeatProducer.java
(rev 0)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/DriversSeatProducer.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -0,0 +1,26 @@
+package org.jboss.weld.atinject.tck;
+
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.inject.Inject;
+
+import org.atinject.tck.auto.Drivers;
+import org.atinject.tck.auto.DriversSeat;
+
+public class DriversSeatProducer extends AbstractProducer<DriversSeat>
+{
+
+ @Inject
+ public DriversSeatProducer(BeanManager beanManager)
+ {
+ super(beanManager, DriversSeat.class);
+ }
+
+ @Override
+ @Produces @Drivers
+ public DriversSeat produce()
+ {
+ return super.produce();
+ }
+
+}
Copied: ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Plain.java
(from rev 3872,
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/Plain.java)
===================================================================
--- ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Plain.java
(rev 0)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Plain.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.weld.atinject.tck;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+@Retention(RUNTIME)
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+public @interface Plain
+{
+
+}
Copied: ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Spare.java
(from rev 3872,
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/Spare.java)
===================================================================
--- ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Spare.java
(rev 0)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/Spare.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.weld.atinject.tck;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+@Retention(RUNTIME)
+@Target( { TYPE, METHOD, FIELD, PARAMETER })
+@Documented
+public @interface Spare
+{
+
+}
Copied:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/SpareTireProducer.java
(from rev 3872,
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/SpareTireProducer.java)
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/SpareTireProducer.java
(rev 0)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/SpareTireProducer.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -0,0 +1,26 @@
+package org.jboss.weld.atinject.tck;
+
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.atinject.tck.auto.accessories.SpareTire;
+
+public class SpareTireProducer extends AbstractProducer<SpareTire>
+{
+
+ @Inject
+ public SpareTireProducer(BeanManager beanManager)
+ {
+ super(beanManager, SpareTire.class);
+ }
+
+ @Override
+ @Produces @Named("spare") @Spare
+ public SpareTire produce()
+ {
+ return super.produce();
+ }
+
+}
Copied: ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util (from
rev 3872, ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util)
Modified:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotated.java
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotated.java 2009-10-07
21:43:49 UTC (rev 3872)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotated.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.jboss.webbeans.atinject.tck.util;
+package org.jboss.weld.atinject.tck.util;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
Modified:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedCallable.java
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedCallable.java 2009-10-07
21:43:49 UTC (rev 3872)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedCallable.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.atinject.tck.util;
+package org.jboss.weld.atinject.tck.util;
import java.util.List;
Modified:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedConstructor.java
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedConstructor.java 2009-10-07
21:43:49 UTC (rev 3872)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedConstructor.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.atinject.tck.util;
+package org.jboss.weld.atinject.tck.util;
import java.lang.reflect.Constructor;
Modified:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedField.java
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedField.java 2009-10-07
21:43:49 UTC (rev 3872)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedField.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.atinject.tck.util;
+package org.jboss.weld.atinject.tck.util;
import java.lang.reflect.Field;
Modified:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedMember.java
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedMember.java 2009-10-07
21:43:49 UTC (rev 3872)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedMember.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.atinject.tck.util;
+package org.jboss.weld.atinject.tck.util;
import java.lang.reflect.Member;
Modified:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedMethod.java
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedMethod.java 2009-10-07
21:43:49 UTC (rev 3872)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedMethod.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.atinject.tck.util;
+package org.jboss.weld.atinject.tck.util;
import java.lang.reflect.Method;
Modified:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedParameter.java
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedParameter.java 2009-10-07
21:43:49 UTC (rev 3872)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedParameter.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.atinject.tck.util;
+package org.jboss.weld.atinject.tck.util;
import javax.enterprise.inject.spi.AnnotatedCallable;
import javax.enterprise.inject.spi.AnnotatedParameter;
Modified:
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedType.java
===================================================================
---
ri/trunk/inject-tck-runner/src/test/java/org/jboss/webbeans/atinject/tck/util/ForwardingAnnotatedType.java 2009-10-07
21:43:49 UTC (rev 3872)
+++
ri/trunk/inject-tck-runner/src/test/java/org/jboss/weld/atinject/tck/util/ForwardingAnnotatedType.java 2009-10-08
03:44:07 UTC (rev 3880)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.atinject.tck.util;
+package org.jboss.weld.atinject.tck.util;
import java.util.Set;