Author: dallen6
Date: 2009-08-07 07:28:32 -0400 (Fri, 07 Aug 2009)
New Revision: 3403
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/AbstractC.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/AlternativeMetaDataTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/ClassD.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/Dog.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/DogHouse.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/InterfaceA.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/InterfaceB.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/Tame.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Bird.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Cat.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/CreationalContextImpl.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Dog.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/DogBed.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/DogProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Noisy.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Preferred.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/PreferredDogProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerProcessor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Quiet.java
Modified:
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Interceptor.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/beanManager/BeanManagerTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
More tests for chapter 11 and some general cleanup in the API and impl.
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Interceptor.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Interceptor.java 2009-08-05
03:51:22 UTC (rev 3402)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Interceptor.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -22,7 +22,15 @@
import javax.interceptor.InvocationContext;
-
+/**
+ * Main interface for all Bean objects representing an interceptor.
+ *
+ * @author Gavin King
+ * @author Pete Muir
+ * @author David Allen
+ *
+ * @param <T>
+ */
public interface Interceptor<T> extends Bean<T>
{
@@ -33,7 +41,23 @@
*/
public Set<Annotation> getInterceptorBindingTypes();
+ /**
+ * Tests if this intercepts callbacks or business methods of the given type
+ *
+ * @param type The type of interception
+ * @return true if this intercepts the given type of methods
+ */
public boolean intercepts(InterceptionType type);
+
+ /**
+ * Invokes the specified kind of lifecycle callback or business method upon the
+ * given instance
+ *
+ * @param type the interception type
+ * @param instance the instance to invoke
+ * @param ctx the context for the invocation
+ * @return the return value from the invocation
+ */
public Object intercept(InterceptionType type, T instance, InvocationContext ctx);
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-08-05
03:51:22 UTC (rev 3402)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -18,15 +18,11 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
-import java.util.Arrays;
import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
import java.util.Set;
import javax.decorator.Decorates;
import javax.enterprise.context.Dependent;
-import javax.enterprise.event.Event;
import javax.enterprise.inject.BindingType;
import javax.enterprise.inject.Named;
import javax.enterprise.inject.Policy;
@@ -37,7 +33,6 @@
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.DefinitionException;
import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
-import org.jboss.webbeans.conversation.ConversationImpl;
import org.jboss.webbeans.injection.WBInjectionPoint;
import org.jboss.webbeans.introspector.WBAnnotated;
import org.jboss.webbeans.introspector.WBField;
@@ -64,30 +59,8 @@
private static final Annotation ANY_LITERAL = new AnyLiteral();
private static final Annotation CURRENT_LITERAL = new CurrentLiteral();
- @SuppressWarnings("unchecked")
- private static Set<Class<?>> STANDARD_WEB_BEAN_CLASSES = new
HashSet<Class<?>>(Arrays.asList(Event.class, BeanManagerImpl.class,
ConversationImpl.class));
-
private boolean proxyable;
- /**
- * Helper method for getting the highest precedence enabled deployment type
- *
- * @param enabledDeploymentTypes The currently enabled deployment types
- * @param possibleDeploymentTypes The possible deployment types
- * @return The deployment type
- */
- public static Class<? extends Annotation> getDeploymentType(List<Class<?
extends Annotation>> enabledDeploymentTypes, Map<Class<? extends
Annotation>, Annotation> possibleDeploymentTypes)
- {
- for (int i = (enabledDeploymentTypes.size() - 1); i > 0; i--)
- {
- if (possibleDeploymentTypes.containsKey((enabledDeploymentTypes.get(i))))
- {
- return enabledDeploymentTypes.get(i);
- }
- }
- return null;
- }
-
// Logger
private final Log log = Logging.getLog(AbstractBean.class);
// The binding types
@@ -283,7 +256,7 @@
Bean<?> resolvedBean = manager.getBeans(injectionPoint.getJavaClass(),
bindings).iterator().next();
if (passivating)
{
- if (Dependent.class.equals(resolvedBean.getScopeType()) &&
!Reflections.isSerializable(resolvedBean.getBeanClass()) && (((injectionPoint
instanceof WBField) && !((WBField<?>) injectionPoint).isTransient()) ||
(injectionPoint instanceof WBParameter)))
+ if (Dependent.class.equals(resolvedBean.getScopeType()) &&
!Reflections.isSerializable(resolvedBean.getBeanClass()) && (((injectionPoint
instanceof WBField<?>) && !((WBField<?>)
injectionPoint).isTransient()) || (injectionPoint instanceof WBParameter<?>)))
{
return false;
}
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java 2009-08-05
03:51:22 UTC (rev 3402)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBClassImpl.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -114,7 +114,7 @@
AnnotationStore annotationStore = AnnotationStore.of(clazz.getAnnotations(),
clazz.getDeclaredAnnotations(), classTransformer.getTypeStore());
return new WBClassImpl<T>(clazz, clazz, annotationStore, classTransformer);
}
-
+
public static <T> WBClass<T> of(AnnotatedType<T> annotatedType,
ClassTransformer classTransformer)
{
AnnotationStore annotationStore =
AnnotationStore.of(annotatedType.getAnnotations(), annotatedType.getAnnotations(),
classTransformer.getTypeStore());
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/AbstractC.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/AbstractC.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/AbstractC.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.extensions.annotated;
+
+class AbstractC implements InterfaceA
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/AbstractC.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/AlternativeMetaDataTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/AlternativeMetaDataTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/AlternativeMetaDataTest.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,90 @@
+/*
+ * 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.jsr299.tck.tests.extensions.annotated;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.spi.AnnotatedType;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.testng.annotations.Test;
+
+/**
+ * Contains all the functioning tests for the extension which provides
+ * alternative meta data sources. Some of the assertions are really statements
+ * of intent, but are tested here to make sure the container provides implementations
+ * that meet that same intent as any third party extension would.
+ *
+ * @author David Allen
+ *
+ */
+@Artifact
+@SpecVersion("20090625")
+public class AlternativeMetaDataTest extends AbstractJSR299Test
+{
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "11.4", id = "c")
+ public void testBaseType()
+ {
+ AnnotatedType<?> annotatedType =
getCurrentManager().createAnnotatedType(DogHouse.class);
+ assert annotatedType.getBaseType().equals(DogHouse.class);
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "11.4", id = "d")
+ public void testTypeClosure()
+ {
+ AnnotatedType<?> annotatedType =
getCurrentManager().createAnnotatedType(ClassD.class);
+ assert annotatedType.getTypeClosure().contains(Object.class);
+ assert annotatedType.getTypeClosure().contains(InterfaceA.class);
+ assert annotatedType.getTypeClosure().contains(InterfaceB.class);
+ assert annotatedType.getTypeClosure().contains(AbstractC.class);
+ assert annotatedType.getTypeClosure().contains(ClassD.class);
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "11.4", id = "e")
+ public void testGetAnnotation()
+ {
+ AnnotatedType<?> annotatedType =
getCurrentManager().createAnnotatedType(ClassD.class);
+ assert annotatedType.getAnnotation(RequestScoped.class) != null;
+ assert annotatedType.getAnnotation(ApplicationScoped.class) == null;
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "11.4", id = "f")
+ public void testGetAnnotations()
+ {
+ AnnotatedType<?> annotatedType =
getCurrentManager().createAnnotatedType(ClassD.class);
+ assert annotatedType.getAnnotations().size() == 2;
+ assert annotatedType.getAnnotations().contains(RequestScoped.class);
+ assert annotatedType.getAnnotations().contains(Tame.class);
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "11.4", id = "g")
+ public void testIsAnnotationPresent()
+ {
+ AnnotatedType<?> annotatedType =
getCurrentManager().createAnnotatedType(ClassD.class);
+ assert annotatedType.isAnnotationPresent(RequestScoped.class);
+ assert annotatedType.isAnnotationPresent(ApplicationScoped.class);
+ }
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/AlternativeMetaDataTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/ClassD.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/ClassD.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/ClassD.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.extensions.annotated;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+@Tame
+class ClassD extends AbstractC implements InterfaceB
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/ClassD.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/Dog.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/Dog.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/Dog.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.extensions.annotated;
+
+class Dog
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/Dog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/DogHouse.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/DogHouse.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/DogHouse.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.extensions.annotated;
+
+import javax.enterprise.inject.Current;
+
+class DogHouse
+{
+ @Current
+ protected Dog dog;
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/DogHouse.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/InterfaceA.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/InterfaceA.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/InterfaceA.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.extensions.annotated;
+
+interface InterfaceA
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/InterfaceA.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/InterfaceB.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/InterfaceB.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/InterfaceB.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.extensions.annotated;
+
+interface InterfaceB
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/InterfaceB.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/Tame.java
(from rev 3398,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/beanManager/Tame.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/Tame.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/annotated/Tame.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.extensions.annotated;
+
+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.enterprise.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Tame
+{
+
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/beanManager/BeanManagerTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/beanManager/BeanManagerTest.java 2009-08-05
03:51:22 UTC (rev 3402)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/beanManager/BeanManagerTest.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -89,12 +89,11 @@
getCurrentManager().resolve(beans);
}
- @Test(groups = "ri-broken", expectedExceptions = InjectionException.class)
+ @Test(expectedExceptions = InjectionException.class)
@SpecAssertions({
@SpecAssertion(section = "11.3.9", id = "a"),
@SpecAssertion(section = "11.3.9", id = "b")
})
- //WBRI-333
public void testValidateThrowsException()
{
DogHouse dogHouse = getInstanceByType(DogHouse.class);
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Bird.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Bird.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Bird.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+class Bird
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Bird.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Cat.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Cat.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Cat.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,28 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+import javax.enterprise.inject.Current;
+import javax.enterprise.inject.Initializer;
+
+class Cat
+{
+ private static boolean initializerCalled;
+
+ @Current
+ protected Bird bird;
+
+ @Initializer
+ public Cat(Dog friend)
+ {
+ initializerCalled = true;
+ }
+
+ public static boolean isInitializerCalled()
+ {
+ return initializerCalled;
+ }
+
+ public static void setInitializerCalled(boolean initializerCalled)
+ {
+ Cat.initializerCalled = initializerCalled;
+ }
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Cat.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/CreationalContextImpl.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/CreationalContextImpl.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/CreationalContextImpl.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+import javax.enterprise.context.spi.CreationalContext;
+
+class CreationalContextImpl<T> implements CreationalContext<T>
+{
+
+ public void push(T incompleteInstance)
+ {
+ }
+
+ public void release()
+ {
+ }
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/CreationalContextImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Dog.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Dog.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Dog.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,55 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+import javax.enterprise.inject.Current;
+import javax.enterprise.inject.Initializer;
+
+
+class Dog
+{
+ private static boolean constructorCalled = false;
+ private static DogBed dogBed;
+
+ public static final String DEFAULT_COLOR = "Brown";
+ private String color = DEFAULT_COLOR;
+
+ public Dog()
+ {
+ constructorCalled = true;
+ }
+
+ public Dog(String color)
+ {
+ this.color = color;
+ }
+
+ @Initializer
+ public void init(@Current DogBed dogBed)
+ {
+ Dog.dogBed = dogBed;
+ }
+
+ public static boolean isConstructorCalled()
+ {
+ return constructorCalled;
+ }
+
+ public static void setConstructorCalled(boolean constructorCalled)
+ {
+ Dog.constructorCalled = constructorCalled;
+ }
+
+ public static DogBed getDogBed()
+ {
+ return dogBed;
+ }
+
+ public static void setDogBed(DogBed dogBed)
+ {
+ Dog.dogBed = dogBed;
+ }
+
+ public String getColor()
+ {
+ return color;
+ }
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Dog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/DogBed.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/DogBed.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/DogBed.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+class DogBed
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/DogBed.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/DogProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/DogProducer.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/DogProducer.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,45 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+
+class DogProducer
+{
+ public static final String DOG_COLOR = "Black";
+ private static boolean noisyDogProducerCalled;
+
+ @Produces @Quiet
+ private Dog quietDog = new Dog(DOG_COLOR);
+
+ @Produces @Noisy
+ public Dog produceNoisyDog()
+ {
+ noisyDogProducerCalled = true;
+ return new Dog();
+ }
+
+ public void disposeNoisyDog(@Disposes @Noisy Dog dog)
+ {
+
+ }
+
+ public void disposeQuietDog(@Disposes @Quiet Dog dog)
+ {
+
+ }
+
+ public static boolean isNoisyDogProducerCalled()
+ {
+ return noisyDogProducerCalled;
+ }
+
+ public static void setNoisyDogProducerCalled(boolean noisyDogProducerCalled)
+ {
+ DogProducer.noisyDogProducerCalled = noisyDogProducerCalled;
+ }
+
+ public Dog getQuietDog()
+ {
+ return quietDog;
+ }
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/DogProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Noisy.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Noisy.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Noisy.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+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.enterprise.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Noisy
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Noisy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Preferred.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Preferred.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Preferred.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+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.enterprise.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Preferred
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Preferred.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/PreferredDogProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/PreferredDogProducer.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/PreferredDogProducer.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,71 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.Specializes;
+
+@Specializes @Preferred
+class PreferredDogProducer extends DogProducer
+{
+
+ public static final String DOG_COLOR = "Gray";
+ private static boolean noisyDogProducerCalled;
+ private static boolean noisyDogDisposed;
+ private static boolean quietDogDisposed;
+
+ @Produces @Quiet
+ private Dog preferredQuietDog = new Dog(DOG_COLOR);
+
+ @Override
+ public Dog getQuietDog()
+ {
+ return preferredQuietDog;
+ }
+
+ @Override
+ public Dog produceNoisyDog()
+ {
+ return new Dog(DOG_COLOR);
+ }
+
+ public void disposeNoisyDog(@Disposes @Noisy Dog dog)
+ {
+ noisyDogDisposed = true;
+ }
+
+ public void disposeQuietDog(@Disposes @Quiet Dog dog)
+ {
+ quietDogDisposed = true;
+ }
+
+ public static boolean isNoisyDogProducerCalled()
+ {
+ return noisyDogProducerCalled;
+ }
+
+ public static void setNoisyDogProducerCalled(boolean noisyDogProducerCalled)
+ {
+ PreferredDogProducer.noisyDogProducerCalled = noisyDogProducerCalled;
+ }
+
+ public static boolean isNoisyDogDisposed()
+ {
+ return noisyDogDisposed;
+ }
+
+ public static boolean isQuietDogDisposed()
+ {
+ return quietDogDisposed;
+ }
+
+ public static void setNoisyDogDisposed(boolean noisyDogDisposed)
+ {
+ PreferredDogProducer.noisyDogDisposed = noisyDogDisposed;
+ }
+
+ public static void setQuietDogDisposed(boolean quietDogDisposed)
+ {
+ PreferredDogProducer.quietDogDisposed = quietDogDisposed;
+ }
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/PreferredDogProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerProcessor.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerProcessor.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerProcessor.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,54 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.ProcessProducer;
+import javax.enterprise.inject.spi.Producer;
+
+class ProducerProcessor
+{
+ private static Producer<Dog> dogProducer;
+ private static Producer<Cat> catProducer;
+ private static Producer<Dog> noisyDogProducer;
+ private static Producer<Dog> quietDogProducer;
+
+ public void processDogProducer(@Observes ProcessProducer<Dog, Dog>
producerEvent)
+ {
+ if (producerEvent.getAnnotatedMember().isAnnotationPresent(Noisy.class))
+ {
+ noisyDogProducer = producerEvent.getProducer();
+ }
+ else if (producerEvent.getAnnotatedMember().isAnnotationPresent(Quiet.class))
+ {
+ quietDogProducer = producerEvent.getProducer();
+ }
+ else
+ {
+ dogProducer = producerEvent.getProducer();
+ }
+ }
+
+ public void processCatProducer(@Observes ProcessProducer<Cat, Cat>
producerEvent)
+ {
+ catProducer = producerEvent.getProducer();
+ }
+
+ public static Producer<Dog> getDogProducer()
+ {
+ return dogProducer;
+ }
+
+ public static Producer<Dog> getNoisyDogProducer()
+ {
+ return noisyDogProducer;
+ }
+
+ public static Producer<Dog> getQuietDogProducer()
+ {
+ return quietDogProducer;
+ }
+
+ public static Producer<Cat> getCatProducer()
+ {
+ return catProducer;
+ }
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,158 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.enterprise.inject.spi.Producer;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecAssertions;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.testng.annotations.Test;
+
+/**
+ * Producer extension tests.
+ *
+ * @author David Allen
+ *
+ */
+@Artifact
+@SpecVersion("20090625")
+public class ProducerTest extends AbstractJSR299Test
+{
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "11.2", id = "ba")
+ })
+ public void testProduceCallsInitializer()
+ {
+ Producer<Cat> producer = ProducerProcessor.getCatProducer();
+ Cat.setInitializerCalled(false);
+ producer.produce(new CreationalContextImpl<Cat>());
+ assert Cat.isInitializerCalled();
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "11.2", id = "bb")
+ })
+ public void testProduceCallsConstructor()
+ {
+ Producer<Dog> producer = ProducerProcessor.getDogProducer();
+ Dog.setConstructorCalled(false);
+ producer.produce(new CreationalContextImpl<Dog>());
+ assert Dog.isConstructorCalled();
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "11.2", id = "c")
+ })
+ public void testDisposeDoesNothing()
+ {
+ Producer<Dog> producer = ProducerProcessor.getDogProducer();
+ Dog dog = getInstanceByType(Dog.class);
+ producer.dispose(dog);
+ // The instance should still be available
+ assert dog == getInstanceByType(Dog.class);
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "11.2", id = "da")
+ })
+ public void testGetInjectionPointsForFields()
+ {
+ Producer<Cat> producer = ProducerProcessor.getCatProducer();
+ assert producer.getInjectionPoints().size() == 2;
+ boolean birdIPPresent = false;
+ for (InjectionPoint injectionPoint : producer.getInjectionPoints())
+ {
+ if (injectionPoint.getType().equals(Bird.class))
+ {
+ birdIPPresent = true;
+ }
+ }
+ assert birdIPPresent;
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "11.2", id = "db")
+ })
+ public void testGetInjectionPointsForConstructor()
+ {
+ Producer<Cat> producer = ProducerProcessor.getCatProducer();
+ assert producer.getInjectionPoints().size() == 2;
+ boolean dogIPPresent = false;
+ for (InjectionPoint injectionPoint : producer.getInjectionPoints())
+ {
+ if (injectionPoint.getType().equals(Dog.class))
+ {
+ dogIPPresent = true;
+ }
+ }
+ assert dogIPPresent;
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "11.2", id = "dc")
+ })
+ public void testGetInjectionPointsForInitializer()
+ {
+ Producer<Dog> producer = ProducerProcessor.getDogProducer();
+ assert producer.getInjectionPoints().size() == 1;
+ assert
producer.getInjectionPoints().iterator().next().getType().equals(DogBed.class);
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "11.2", id = "ea")
+ })
+ public void testProduceCallsProducerMethod()
+ {
+ PreferredDogProducer.setNoisyDogProducerCalled(false);
+ Producer<Dog> producer = ProducerProcessor.getNoisyDogProducer();
+ Dog dog = (Dog) producer.produce(new CreationalContextImpl<Dog>());
+ assert PreferredDogProducer.isNoisyDogProducerCalled();
+ assert dog.getColor().equals(PreferredDogProducer.DOG_COLOR);
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "11.2", id = "eb")
+ })
+ public void testProduceAccessesProducerField()
+ {
+ Producer<Dog> producer = ProducerProcessor.getQuietDogProducer();
+ Dog dog = (Dog) producer.produce(new CreationalContextImpl<Dog>());
+ assert dog.getColor().equals(PreferredDogProducer.DOG_COLOR);
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "11.2", id = "fa")
+ })
+ public void testProducerForMethodDisposesProduct()
+ {
+ PreferredDogProducer.setNoisyDogDisposed(false);
+ Producer<Dog> producer = ProducerProcessor.getNoisyDogProducer();
+ Dog dog = (Dog) producer.produce(new CreationalContextImpl<Dog>());
+ producer.dispose(dog);
+ assert PreferredDogProducer.isNoisyDogDisposed();
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "11.2", id = "fb")
+ })
+ public void testProducerForFieldDisposesProduct()
+ {
+ PreferredDogProducer.setQuietDogDisposed(false);
+ Producer<Dog> producer = ProducerProcessor.getQuietDogProducer();
+ Dog dog = (Dog) producer.produce(new CreationalContextImpl<Dog>());
+ producer.dispose(dog);
+ assert PreferredDogProducer.isQuietDogDisposed();
+ }
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/ProducerTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Quiet.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Quiet.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Quiet.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.extensions.producer;
+
+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.enterprise.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Quiet
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/producer/Quiet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java 2009-08-05
03:51:22 UTC (rev 3402)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/interceptors/definition/InterceptorDefinitionTest.java 2009-08-07
11:28:32 UTC (rev 3403)
@@ -73,8 +73,46 @@
@Test(groups = "ri-broken")
@SpecAssertions({
+ @SpecAssertion(section = "11.1.2", id = "b")
+ })
+ // WBRI-59
+ public void testInterceptorBindingTypes()
+ {
+ Interceptor<?> interceptorBean = (Interceptor<?>)
getBeans(TransactionalInterceptor.class).iterator().next();
+ assert interceptorBean.getInterceptorBindingTypes().size() == 1;
+ assert interceptorBean.getInterceptorBindingTypes().contains(Transactional.class);
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
+ @SpecAssertion(section = "11.1.2", id = "c"),
+ @SpecAssertion(section = "11.1.2", id = "e")
+ })
+ // WBRI-59
+ public void testInterceptionType()
+ {
+ Interceptor<?> interceptorBean = (Interceptor<?>)
getBeans(TransactionalInterceptor.class).iterator().next();
+ assert interceptorBean.intercepts(InterceptionType.AROUND_INVOKE);
+ assert !interceptorBean.intercepts(InterceptionType.POST_ACTIVATE);
+ assert !interceptorBean.intercepts(InterceptionType.POST_CONSTRUCT);
+ assert !interceptorBean.intercepts(InterceptionType.PRE_DESTROY);
+ assert !interceptorBean.intercepts(InterceptionType.PRE_PASSIVATE);
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "11.1.2", id = "f")
+ // WBRI-59
+ public void testInstanceOfInterceptorForEveryEnabledInterceptor()
+ {
+ assert !getBeans(TransactionalInterceptor.class).isEmpty();
+ assert !getBeans(SecureInterceptor.class).isEmpty();
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions({
@SpecAssertion(section = "11.3.13", id = "a")
})
+ // WBRI-59
public void testResolveInterceptorsReturnsOrderedList()
{
Annotation transactionalBinding = new AnnotationLiteral<Transactional>() {};
@@ -95,6 +133,7 @@
@SpecAssertions({
@SpecAssertion(section = "11.3.13", id = "b")
})
+ // WBRI-59
public void testSameBindingTypesToResolveInterceptorsFails()
{
Annotation transactionalBinding = new AnnotationLiteral<Transactional>() {};
@@ -105,6 +144,7 @@
@SpecAssertions({
@SpecAssertion(section = "11.3.13", id = "c")
})
+ // WBRI-59
public void testNoBindingTypesToResolveInterceptorsFails()
{
getCurrentManager().resolveInterceptors(InterceptionType.AROUND_INVOKE);
@@ -114,6 +154,7 @@
@SpecAssertions({
@SpecAssertion(section = "11.3.13", id = "d")
})
+ // WBRI-59
public void testNonBindingTypeToResolveInterceptorsFails()
{
Annotation nonBinding = new AnnotationLiteral<NonBindingType>() {};
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-08-05 03:51:22 UTC (rev 3402)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-08-07 11:28:32 UTC (rev 3403)
@@ -4304,11 +4304,16 @@
</section>
<section id="11.2" title="The Producer and InjectionTarget
interfaces">
- <assertion id="a">
+ <assertion id="a" testable="false">
<text>The interface |javax.enterprise.inject.spi.Producer| provides a generic
operation for producing an instance of a type.</text>
+ <note>Statement of intent</note>
</assertion>
+
+ <assertion id="ba">
+ <text>For a |Producer| that represents a class, |produce()| calls the
constructor annotated |@Initializer| if it exists, or the constructor with no parameters
otherwise, as defined in Section 5.6.3, "Injection using the bean
constructor".</text>
+ </assertion>
- <assertion id="b">
+ <assertion id="bb">
<text>For a |Producer| that represents a class, |produce()| calls the
constructor annotated |@Initializer| if it exists, or the constructor with no parameters
otherwise, as defined in Section 5.6.3, "Injection using the bean
constructor".</text>
</assertion>
@@ -4316,18 +4321,34 @@
<text>For a |Producer| that represents a class, |dispose()| does
nothing.</text>
</assertion>
- <assertion id="d">
- <text>For a |Producer| that represents a class, |getInjectionPoints()|
returns a set of |InjectionPoint| objects representing all injected fields, bean
constructor parameters and initializer method parameters.</text>
+ <assertion id="da">
+ <text>For a |Producer| that represents a class, |getInjectionPoints()|
returns a set of |InjectionPoint| objects representing all _injected fields_, bean
constructor parameters and initializer method parameters.</text>
</assertion>
- <assertion id="e">
- <text>For a Producer that represents a producer method or field, |produce()|
calls the producer method on, or accesses the producer field of, a contextual instance of
the most specialized bean that specializes the bean that declares the producer method, as
defined in Section 5.6.6, "Invocation of producer or disposer
methods".</text>
+ <assertion id="db">
+ <text>For a |Producer| that represents a class, |getInjectionPoints()|
returns a set of |InjectionPoint| objects representing all injected fields, _bean
constructor parameters_ and initializer method parameters.</text>
</assertion>
- <assertion id="f">
- <text>For a Producer that represents a producer method or field, |dispose()|
calls the disposer method, if any, on a contextual instance of the most specialized bean
that specializes the bean that declares the disposer method, as defined in Section 5.6.6,
"Invocation of producer or disposer methods", or performs any additional
required cleanup, if any, to destroy state associated with a resource.</text>
+ <assertion id="dc">
+ <text>For a |Producer| that represents a class, |getInjectionPoints()|
returns a set of |InjectionPoint| objects representing all injected fields, bean
constructor parameters and _initializer method parameters_.</text>
</assertion>
+ <assertion id="ea">
+ <text>For a Producer that represents a producer _method_ or field,
|produce()| _calls the producer method on_, or accesses the producer field of, a
contextual instance of the most specialized bean that specializes the bean that declares
the producer method, as defined in Section 5.6.6, "Invocation of producer or disposer
methods".</text>
+ </assertion>
+
+ <assertion id="eb">
+ <text>For a Producer that represents a producer method or _field_,
|produce()| calls the producer method on, _or accesses the producer field of_, a
contextual instance of the most specialized bean that specializes the bean that declares
the producer method, as defined in Section 5.6.6, "Invocation of producer or disposer
methods".</text>
+ </assertion>
+
+ <assertion id="fa">
+ <text>For a Producer that represents a producer _method_ or field,
|dispose()| calls the disposer method, if any, on a contextual instance of the most
specialized bean that specializes the bean that declares the disposer method, as defined
in Section 5.6.6, "Invocation of producer or disposer methods", or performs any
additional required cleanup, if any, to destroy state associated with a
resource.</text>
+ </assertion>
+
+ <assertion id="fb">
+ <text>For a Producer that represents a producer method or _field_,
|dispose()| calls the disposer method, if any, on a contextual instance of the most
specialized bean that specializes the bean that declares the disposer method, as defined
in Section 5.6.6, "Invocation of producer or disposer methods", or performs any
additional required cleanup, if any, to destroy state associated with a
resource.</text>
+ </assertion>
+
<assertion id="g">
<text>For a Producer that represents a producer method or field,
|getInjectionPoints()| returns the set of |InjectionPoint| objects representing all
parameters of the producer method.</text>
</assertion>