Author: pete.muir(a)jboss.org
Date: 2010-07-23 13:55:55 -0400 (Fri, 23 Jul 2010)
New Revision: 6772
Added:
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/Generic.java
Removed:
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/GenericBean.java
Modified:
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/GenericExtension.java
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/InjectGeneric.java
extensions/trunk/impl/src/test/java/org/jboss/weld/extensions/test/bean/generic/Bar.java
extensions/trunk/impl/src/test/java/org/jboss/weld/extensions/test/bean/generic/Baz.java
Log:
revert back to Generic, javadoc
Copied:
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/Generic.java
(from rev 6769,
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/GenericBean.java)
===================================================================
---
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/Generic.java
(rev 0)
+++
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/Generic.java 2010-07-23
17:55:55 UTC (rev 6772)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.extensions.bean.generic;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Defines a set of generic beans which can inject the specified configuration
annotation
+ *
+ * @author Stuart Douglas <stuart(a)baileyroberts.com.au>
+ * @author Pete Muir
+ *
+ */
+@Retention( RUNTIME )
+@Target( TYPE )
+public @interface Generic
+{
+ Class<?> value();
+}
Deleted:
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/GenericBean.java
===================================================================
---
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/GenericBean.java 2010-07-23
17:51:57 UTC (rev 6771)
+++
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/GenericBean.java 2010-07-23
17:55:55 UTC (rev 6772)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., 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.extensions.bean.generic;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Marks a generic bean
- *
- * @author Stuart Douglas <stuart(a)baileyroberts.com.au>
- *
- */
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target( { ElementType.TYPE })
-public @interface GenericBean
-{
- Class<?> value();
-}
Modified:
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/GenericExtension.java
===================================================================
---
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/GenericExtension.java 2010-07-23
17:51:57 UTC (rev 6771)
+++
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/GenericExtension.java 2010-07-23
17:55:55 UTC (rev 6772)
@@ -77,9 +77,9 @@
public void processAnnotatedType(@Observes ProcessAnnotatedType<?> event)
{
AnnotatedType<?> type = event.getAnnotatedType();
- if (type.isAnnotationPresent(GenericBean.class))
+ if (type.isAnnotationPresent(Generic.class))
{
- GenericBean an = type.getAnnotation(GenericBean.class);
+ Generic an = type.getAnnotation(Generic.class);
if (!genericBeans.containsKey(an.value()))
{
genericBeans.put(an.value(), new HashSet<AnnotatedType<?>>());
Modified:
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/InjectGeneric.java
===================================================================
---
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/InjectGeneric.java 2010-07-23
17:51:57 UTC (rev 6771)
+++
extensions/trunk/impl/src/main/java/org/jboss/weld/extensions/bean/generic/InjectGeneric.java 2010-07-23
17:55:55 UTC (rev 6772)
@@ -22,7 +22,7 @@
import java.lang.annotation.Target;
/**
- * used to mark where a generic bean should be inejcted in place of the normal
+ * used to mark where a generic bean should be injected in place of the normal
* @Inject, this may not be required in the future
*
* @author Stuart Douglas <stuart(a)baileyroberts.com.au>
Modified:
extensions/trunk/impl/src/test/java/org/jboss/weld/extensions/test/bean/generic/Bar.java
===================================================================
---
extensions/trunk/impl/src/test/java/org/jboss/weld/extensions/test/bean/generic/Bar.java 2010-07-23
17:51:57 UTC (rev 6771)
+++
extensions/trunk/impl/src/test/java/org/jboss/weld/extensions/test/bean/generic/Bar.java 2010-07-23
17:55:55 UTC (rev 6772)
@@ -18,7 +18,7 @@
import javax.inject.Inject;
-import org.jboss.weld.extensions.bean.generic.GenericBean;
+import org.jboss.weld.extensions.bean.generic.Generic;
/**
* A generic bean
@@ -27,7 +27,7 @@
*
*/
-(a)GenericBean(Garply.class)
+(a)Generic(Garply.class)
public class Bar
{
@Inject
Modified:
extensions/trunk/impl/src/test/java/org/jboss/weld/extensions/test/bean/generic/Baz.java
===================================================================
---
extensions/trunk/impl/src/test/java/org/jboss/weld/extensions/test/bean/generic/Baz.java 2010-07-23
17:51:57 UTC (rev 6771)
+++
extensions/trunk/impl/src/test/java/org/jboss/weld/extensions/test/bean/generic/Baz.java 2010-07-23
17:55:55 UTC (rev 6772)
@@ -18,7 +18,7 @@
import javax.inject.Inject;
-import org.jboss.weld.extensions.bean.generic.GenericBean;
+import org.jboss.weld.extensions.bean.generic.Generic;
/**
*
@@ -27,7 +27,7 @@
*
*/
-(a)GenericBean(Garply.class)
+(a)Generic(Garply.class)
public class Baz
{