Author: dallen6
Date: 2009-07-29 10:45:28 -0400 (Wed, 29 Jul 2009)
New Revision: 3351
Modified:
ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/AbstractStandardBean.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/SameBeanTypeInChildActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/ManagerTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/MyContextual.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/DependencyResolutionTest.java
Log:
Updated Bean to latest spec 20090625 for real this time.
Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java 2009-07-29 13:36:54
UTC (rev 3350)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Bean.java 2009-07-29 14:45:28
UTC (rev 3351)
@@ -63,6 +63,13 @@
public String getName();
/**
+ * The stereotypes applied to this bean
+ *
+ * @return stereotypes if any
+ */
+ public Set<Class<? extends Annotation>> getStereotypes();
+
+ /**
* The bean class of the managed bean or session bean or of the bean that
* declares the producer method or field
*
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java 2009-07-29
13:36:54 UTC (rev 3350)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -61,6 +61,11 @@
return decorator;
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return decorator.getStereotypes();
+ }
+
};
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java 2009-07-29
13:36:54 UTC (rev 3350)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -19,6 +19,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@@ -280,4 +281,9 @@
// TODO sort out ordering of init, then we can use initDeploymentType and hence
checkDeploymentType
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-07-29
13:36:54 UTC (rev 3350)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -17,9 +17,11 @@
package org.jboss.webbeans.bean;
import java.io.Serializable;
+import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.Arrays;
+import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;
@@ -382,6 +384,11 @@
{
return false;
}
+
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java 2009-07-29
13:36:54 UTC (rev 3350)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -16,7 +16,10 @@
*/
package org.jboss.webbeans.bean;
+import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
+import java.util.Collections;
+import java.util.Set;
import javax.enterprise.context.spi.CreationalContext;
@@ -159,4 +162,9 @@
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-07-29
13:36:54 UTC (rev 3350)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -16,8 +16,10 @@
*/
package org.jboss.webbeans.bean;
+import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
+import java.util.Collections;
import java.util.Set;
import javax.enterprise.context.spi.CreationalContext;
@@ -275,4 +277,9 @@
return id;
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-07-29
13:36:54 UTC (rev 3350)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -553,4 +553,10 @@
return false;
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/AbstractStandardBean.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/AbstractStandardBean.java 2009-07-29
13:36:54 UTC (rev 3350)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/AbstractStandardBean.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -79,6 +79,11 @@
return null;
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
@Override
public Set<WBInjectionPoint<?, ?>> getAnnotatedInjectionPoints()
{
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java 2009-07-29
13:36:54 UTC (rev 3350)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -3,6 +3,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Member;
import java.lang.reflect.Type;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@@ -107,6 +108,11 @@
return false;
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
};
InjectionPoint injectionPoint = new InjectionPoint()
{
@@ -269,6 +275,11 @@
return bindingTypes;
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
});
createContextualInstance(Field.class).get();
}
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/SameBeanTypeInChildActivityTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/SameBeanTypeInChildActivityTest.java 2009-07-29
13:36:54 UTC (rev 3350)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/child/SameBeanTypeInChildActivityTest.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -2,6 +2,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@@ -100,6 +101,11 @@
return false;
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
};
return bean;
}
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java 2009-07-29
13:36:54 UTC (rev 3350)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -151,6 +151,11 @@
return false;
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
}
@Test
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java 2009-07-29
13:36:54 UTC (rev 3350)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -159,6 +159,11 @@
return false;
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
}
@Test
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/ManagerTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/ManagerTest.java 2009-07-29
13:36:54 UTC (rev 3350)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/manager/ManagerTest.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -98,6 +98,11 @@
{
return false;
}
+
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/MyContextual.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/MyContextual.java 2009-07-29
13:36:54 UTC (rev 3350)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/MyContextual.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -100,4 +100,9 @@
return false;
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/DependencyResolutionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/DependencyResolutionTest.java 2009-07-29
13:36:54 UTC (rev 3350)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/DependencyResolutionTest.java 2009-07-29
14:45:28 UTC (rev 3351)
@@ -4,6 +4,7 @@
import java.lang.reflect.Field;
import java.lang.reflect.Member;
import java.lang.reflect.Type;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@@ -154,6 +155,11 @@
return false;
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return Collections.emptySet();
+ }
+
};
getCurrentManager().addBean(wrappedBean);