Author: pete.muir(a)jboss.org
Date: 2009-10-29 16:11:59 -0400 (Thu, 29 Oct 2009)
New Revision: 4423
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java
core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java
core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldConstructor.java
core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecorator1.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecorator2.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/simple/SimpleDecorator.java
Log:
@Decorates -> @Delegate
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2009-10-29
20:04:32 UTC (rev 4422)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2009-10-29
20:11:59 UTC (rev 4423)
@@ -31,7 +31,7 @@
import java.util.Map;
import java.util.Set;
-import javax.decorator.Decorates;
+import javax.decorator.Delegate;
import javax.enterprise.context.Dependent;
import javax.enterprise.inject.Alternative;
import javax.enterprise.inject.New;
@@ -163,7 +163,7 @@
protected void addInjectionPoint(WeldInjectionPoint<?, ?> injectionPoint)
{
- if (injectionPoint.isAnnotationPresent(Decorates.class))
+ if (injectionPoint.isAnnotationPresent(Delegate.class))
{
this.delegateInjectionPoints.add(injectionPoint);
}
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
===================================================================
---
core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java 2009-10-29
20:04:32 UTC (rev 4422)
+++
core/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java 2009-10-29
20:11:59 UTC (rev 4423)
@@ -28,7 +28,7 @@
import java.util.List;
import java.util.Set;
-import javax.decorator.Decorates;
+import javax.decorator.Delegate;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Annotated;
import javax.enterprise.inject.spi.Bean;
@@ -78,7 +78,7 @@
{
this.declaringBean = declaringBean;
this.constructor = constructor;
- this.delegate = isAnnotationPresent(Decorates.class) && declaringBean
instanceof Decorator<?>;
+ this.delegate = isAnnotationPresent(Delegate.class) && declaringBean
instanceof Decorator<?>;
}
@Override
Modified: core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java
===================================================================
---
core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java 2009-10-29
20:04:32 UTC (rev 4422)
+++
core/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java 2009-10-29
20:11:59 UTC (rev 4423)
@@ -24,7 +24,7 @@
import java.lang.reflect.Type;
import java.util.Set;
-import javax.decorator.Decorates;
+import javax.decorator.Delegate;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Annotated;
import javax.enterprise.inject.spi.Bean;
@@ -53,7 +53,7 @@
{
this.declaringBean = declaringBean;
this.field = field;
- this.delegate = isAnnotationPresent(Decorates.class) && declaringBean
instanceof Decorator<?>;
+ this.delegate = isAnnotationPresent(Delegate.class) && declaringBean
instanceof Decorator<?>;
}
@Override
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java
===================================================================
---
core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java 2009-10-29
20:04:32 UTC (rev 4422)
+++
core/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java 2009-10-29
20:11:59 UTC (rev 4423)
@@ -28,7 +28,7 @@
import java.util.List;
import java.util.Set;
-import javax.decorator.Decorates;
+import javax.decorator.Delegate;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Annotated;
import javax.enterprise.inject.spi.Bean;
@@ -78,7 +78,7 @@
{
this.declaringBean = declaringBean;
this.method = method;
- this.delegate = isAnnotationPresent(Decorates.class) && declaringBean
instanceof Decorator<?>;
+ this.delegate = isAnnotationPresent(Delegate.class) && declaringBean
instanceof Decorator<?>;
}
@Override
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java
===================================================================
---
core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java 2009-10-29
20:04:32 UTC (rev 4422)
+++
core/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java 2009-10-29
20:11:59 UTC (rev 4423)
@@ -21,7 +21,7 @@
import java.lang.reflect.Type;
import java.util.Set;
-import javax.decorator.Decorates;
+import javax.decorator.Delegate;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Annotated;
import javax.enterprise.inject.spi.Bean;
@@ -49,7 +49,7 @@
{
this.declaringBean = declaringBean;
this.parameter = parameter;
- this.delegate = isAnnotationPresent(Decorates.class) && declaringBean
instanceof Decorator<?>;
+ this.delegate = isAnnotationPresent(Delegate.class) && declaringBean
instanceof Decorator<?>;
}
@Override
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldConstructor.java
===================================================================
---
core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldConstructor.java 2009-10-29
20:04:32 UTC (rev 4422)
+++
core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldConstructor.java 2009-10-29
20:11:59 UTC (rev 4423)
@@ -23,7 +23,7 @@
import java.util.HashSet;
import java.util.Set;
-import javax.decorator.Decorates;
+import javax.decorator.Delegate;
import javax.enterprise.inject.spi.AnnotatedConstructor;
/**
@@ -36,7 +36,7 @@
{
@SuppressWarnings("unchecked")
- public static final Set<Class<? extends Annotation>>
MAPPED_PARAMETER_ANNOTATIONS = new HashSet<Class<? extends
Annotation>>(Arrays.asList(Decorates.class));
+ public static final Set<Class<? extends Annotation>>
MAPPED_PARAMETER_ANNOTATIONS = new HashSet<Class<? extends
Annotation>>(Arrays.asList(Delegate.class));
/**
* Creates a new instance of the class, using this constructor
Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java 2009-10-29 20:04:32 UTC
(rev 4422)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java 2009-10-29 20:11:59 UTC
(rev 4423)
@@ -39,7 +39,7 @@
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
-import javax.decorator.Decorates;
+import javax.decorator.Delegate;
import javax.decorator.Decorator;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
@@ -169,7 +169,7 @@
addFieldInjectionPoint(annotatedField, fields, declaringBean);
}
}
- for (WeldField<?, ?> annotatedField :
t.getAnnotatedWeldFields(Decorates.class))
+ for (WeldField<?, ?> annotatedField :
t.getAnnotatedWeldFields(Delegate.class))
{
if (!annotatedField.isStatic())
{
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecorator1.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecorator1.java 2009-10-29
20:04:32 UTC (rev 4422)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecorator1.java 2009-10-29
20:11:59 UTC (rev 4423)
@@ -21,7 +21,7 @@
*/
package org.jboss.weld.test.unit.decorator.simple;
-import javax.decorator.Decorates;
+import javax.decorator.Delegate;
import javax.decorator.Decorator;
/**
@@ -32,7 +32,7 @@
@Decorator
public class SimpleDecorator1
{
- @Decorates
+ @Delegate
SimpleBean delegate;
public static boolean echo1;
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecorator2.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecorator2.java 2009-10-29
20:04:32 UTC (rev 4422)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecorator2.java 2009-10-29
20:11:59 UTC (rev 4423)
@@ -21,7 +21,7 @@
*/
package org.jboss.weld.test.unit.decorator.simple;
-import javax.decorator.Decorates;
+import javax.decorator.Delegate;
import javax.decorator.Decorator;
/**
@@ -32,7 +32,7 @@
@Decorator
public class SimpleDecorator2
{
- @Decorates
+ @Delegate
SimpleBean delegate;
public static boolean echo2;
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/simple/SimpleDecorator.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/simple/SimpleDecorator.java 2009-10-29
20:04:32 UTC (rev 4422)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/simple/SimpleDecorator.java 2009-10-29
20:11:59 UTC (rev 4423)
@@ -18,7 +18,7 @@
import org.jboss.weld.test.unit.interceptor.simple.SimpleBean;
-import javax.decorator.Decorates;
+import javax.decorator.Delegate;
import javax.decorator.Decorator;
/**
@@ -29,7 +29,7 @@
@Decorator
public class SimpleDecorator
{
- @Decorates
+ @Delegate
SimpleBean delegate;
public String doSomething()