You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by ge...@apache.org on 2009/11/22 17:35:43 UTC
svn commit: r883099 - in /incubator/openwebbeans/trunk/webbeans-impl/src:
main/java/org/apache/webbeans/config/
main/java/org/apache/webbeans/intercept/webbeans/
main/java/org/apache/webbeans/util/ main/java/org/apache/webbeans/xml/
test/java/org/apach...
Author: gerdogdu
Date: Sun Nov 22 16:35:42 2009
New Revision: 883099
URL: http://svn.apache.org/viewvc?rev=883099&view=rev
Log:
Update for obeying API.
Modified:
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java
incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java
incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/annotation/binding/AnnotationWithNonBindingMember.java
incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/definition/BeanTypesDefinedBean.java
incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Secure.java
incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Secure2.java
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java?rev=883099&r1=883098&r2=883099&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java Sun Nov 22 16:35:42 2009
@@ -29,7 +29,7 @@
import javax.enterprise.context.Dependent;
import javax.enterprise.context.NormalScope;
import javax.enterprise.event.Observes;
-import javax.enterprise.inject.BeanTypes;
+import javax.enterprise.inject.Typed;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.Specializes;
@@ -40,7 +40,7 @@
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.enterprise.inject.spi.ObserverMethod;
-import javax.enterprise.util.NonBinding;
+import javax.enterprise.util.Nonbinding;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Scope;
@@ -96,9 +96,9 @@
Annotation[] annots = clazz.getDeclaredAnnotations();
//Looking for bean types
- if(AnnotationUtil.hasAnnotation(annots, BeanTypes.class))
+ if(AnnotationUtil.hasAnnotation(annots, Typed.class))
{
- BeanTypes beanTypes = (BeanTypes) AnnotationUtil.getAnnotation(annots, BeanTypes.class);
+ Typed beanTypes = (Typed) AnnotationUtil.getAnnotation(annots, Typed.class);
defineUserDefinedBeanTypes(bean, beanTypes);
}
else
@@ -108,7 +108,7 @@
}
- private static <T> void defineUserDefinedBeanTypes(AbstractBean<T> bean, BeanTypes beanTypes)
+ private static <T> void defineUserDefinedBeanTypes(AbstractBean<T> bean, Typed beanTypes)
{
Class<?> beanClazz = bean.getReturnType();
Class<?>[] types = beanTypes.value();
@@ -139,9 +139,9 @@
{
//Looking for bean types
- if(AnnotationUtil.hasAnnotation(annots, BeanTypes.class))
+ if(AnnotationUtil.hasAnnotation(annots, Typed.class))
{
- BeanTypes beanTypes = (BeanTypes) AnnotationUtil.getAnnotation(annots, BeanTypes.class);
+ Typed beanTypes = (Typed) AnnotationUtil.getAnnotation(annots, Typed.class);
defineUserDefinedBeanTypes(producerBean, beanTypes);
}
@@ -186,7 +186,7 @@
Class<?> clazz = method.getReturnType();
if (clazz.isArray() || clazz.isAnnotation())
{
- if (!AnnotationUtil.hasAnnotation(method.getDeclaredAnnotations(), NonBinding.class))
+ if (!AnnotationUtil.hasAnnotation(method.getDeclaredAnnotations(), Nonbinding.class))
{
throw new WebBeansConfigurationException("WebBeans definition class : " + component.getReturnType().getName() + " @Qualifier : " + annotation.annotationType().getName() + " must have @NonBinding valued members for its array-valued and annotation valued members");
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java?rev=883099&r1=883098&r2=883099&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java Sun Nov 22 16:35:42 2009
@@ -28,7 +28,7 @@
import javax.enterprise.inject.spi.InjectionPoint;
import javax.enterprise.inject.spi.InterceptionType;
import javax.enterprise.inject.spi.Interceptor;
-import javax.enterprise.util.NonBinding;
+import javax.enterprise.util.Nonbinding;
import javax.interceptor.InvocationContext;
import org.apache.webbeans.component.AbstractBean;
@@ -102,7 +102,7 @@
Class<?> clazz = method.getReturnType();
if (clazz.isArray() || clazz.isAnnotation())
{
- if (!AnnotationUtil.hasAnnotation(method.getAnnotations(), NonBinding.class))
+ if (!AnnotationUtil.hasAnnotation(method.getAnnotations(), Nonbinding.class))
{
throw new WebBeansConfigurationException("Interceptor definition class : " + getClazz().getName() + " @InterceptorBinding : " + binding.getName() + " must have @NonBinding valued members for its array-valued and annotation valued members");
}
@@ -114,7 +114,7 @@
/**
* Checks whether all of this interceptors binding types are present on the bean, with
- * {@link NonBinding} member values.
+ * {@link Nonbinding} member values.
*
* @param bindingTypes binding types of bean
* @param annots binding types annots of bean
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java?rev=883099&r1=883098&r2=883099&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java Sun Nov 22 16:35:42 2009
@@ -28,7 +28,7 @@
import javax.enterprise.inject.Any;
import javax.enterprise.inject.Stereotype;
import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.util.NonBinding;
+import javax.enterprise.util.Nonbinding;
import javax.inject.Qualifier;
import javax.interceptor.InterceptorBinding;
@@ -432,7 +432,7 @@
}
/**
- * Returns true if the injection point binding type and {@link NonBinding}
+ * Returns true if the injection point binding type and {@link Nonbinding}
* member values are equal to the given member annotation.
*
* @param clazz annotation class
@@ -463,7 +463,7 @@
{
for (Annotation annot : annots)
{
- if (!annot.annotationType().equals(NonBinding.class))
+ if (!annot.annotationType().equals(Nonbinding.class))
{
list.add(method.getName());
}
@@ -485,7 +485,7 @@
*
* @param src annotation toString method
* @param member annotation toString method
- * @param arguments annotation member values with {@link NonBinding}
+ * @param arguments annotation member values with {@link Nonbinding}
* annoations.
* @return true or false
*/
@@ -800,7 +800,7 @@
Class<?> clazz = method.getReturnType();
if (clazz.isArray() || clazz.isAnnotation())
{
- if (!AnnotationUtil.hasAnnotation(method.getDeclaredAnnotations(), NonBinding.class))
+ if (!AnnotationUtil.hasAnnotation(method.getDeclaredAnnotations(), Nonbinding.class))
{
throw new WebBeansConfigurationException("@Qualifier : " + ann.annotationType().getName() + " must have @NonBinding valued members for its array-valued and annotation valued members");
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java?rev=883099&r1=883098&r2=883099&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java Sun Nov 22 16:35:42 2009
@@ -31,7 +31,7 @@
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.enterprise.inject.spi.Interceptor;
-import javax.enterprise.util.NonBinding;
+import javax.enterprise.util.Nonbinding;
import javax.inject.Named;
import javax.inject.Scope;
import javax.interceptor.AroundInvoke;
@@ -200,7 +200,7 @@
Class<?> clazz = method.getReturnType();
if (clazz.isArray() || clazz.isAnnotation())
{
- if (!AnnotationUtil.hasAnnotation(method.getAnnotations(), NonBinding.class))
+ if (!AnnotationUtil.hasAnnotation(method.getAnnotations(), Nonbinding.class))
{
throw new WebBeansConfigurationException(errorMessage + "WebBeans definition class : " + component.getReturnType().getName() + " @Qualifier : " + temp.getName() + " must have @NonBinding valued members for its array-valued and annotation valued members");
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/annotation/binding/AnnotationWithNonBindingMember.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/annotation/binding/AnnotationWithNonBindingMember.java?rev=883099&r1=883098&r2=883099&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/annotation/binding/AnnotationWithNonBindingMember.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/annotation/binding/AnnotationWithNonBindingMember.java Sun Nov 22 16:35:42 2009
@@ -18,7 +18,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import javax.enterprise.util.NonBinding;
+import javax.enterprise.util.Nonbinding;
import javax.inject.Qualifier;
@Qualifier
@@ -28,9 +28,9 @@
String value() default "";
- @NonBinding
+ @Nonbinding
String arg1();
- @NonBinding
+ @Nonbinding
String arg2();
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/definition/BeanTypesDefinedBean.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/definition/BeanTypesDefinedBean.java?rev=883099&r1=883098&r2=883099&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/definition/BeanTypesDefinedBean.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/definition/BeanTypesDefinedBean.java Sun Nov 22 16:35:42 2009
@@ -15,18 +15,18 @@
import java.io.Serializable;
-import javax.enterprise.inject.BeanTypes;
+import javax.enterprise.inject.Typed;
import javax.enterprise.inject.Produces;
import javax.inject.Named;
import org.apache.webbeans.test.component.CheckWithCheckPayment;
-@BeanTypes(value={BeanTypesDefinedBean.class})
+@Typed(value={BeanTypesDefinedBean.class})
public class BeanTypesDefinedBean implements Serializable
{
- private @Produces @Named("paymentField") @BeanTypes(value={CheckWithCheckPayment.class}) CheckWithCheckPayment payment;
+ private @Produces @Named("paymentField") @Typed(value={CheckWithCheckPayment.class}) CheckWithCheckPayment payment;
- @Produces @Named("paymentMethod") @BeanTypes(value={CheckWithCheckPayment.class})
+ @Produces @Named("paymentMethod") @Typed(value={CheckWithCheckPayment.class})
public CheckWithCheckPayment produce()
{
return null;
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Secure.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Secure.java?rev=883099&r1=883098&r2=883099&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Secure.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Secure.java Sun Nov 22 16:35:42 2009
@@ -18,7 +18,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import javax.enterprise.util.NonBinding;
+import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;
@InterceptorBinding
@@ -27,7 +27,7 @@
@Transactional
public @interface Secure {
- @NonBinding
+ @Nonbinding
String[] rolesAllowed() default {};
}
Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Secure2.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Secure2.java?rev=883099&r1=883098&r2=883099&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Secure2.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/intercept/webbeans/bindings/Secure2.java Sun Nov 22 16:35:42 2009
@@ -18,7 +18,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import javax.enterprise.util.NonBinding;
+import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;
@InterceptorBinding
@@ -26,7 +26,7 @@
@Target( { ElementType.TYPE, ElementType.METHOD })
public @interface Secure2 {
- @NonBinding
+ @Nonbinding
String[] rolesAllowed() default {};
}