[weld-commits] Weld SVN: r6384 - extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Wed Jun 2 18:22:03 EDT 2010


Author: shane.bryzak at jboss.com
Date: 2010-06-02 18:22:02 -0400 (Wed, 02 Jun 2010)
New Revision: 6384

Modified:
   extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/FieldProperty.java
   extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/MethodProperty.java
   extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/Property.java
Log:
revert getAnnotatedElement

Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/FieldProperty.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/FieldProperty.java	2010-06-02 22:20:02 UTC (rev 6383)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/FieldProperty.java	2010-06-02 22:22:02 UTC (rev 6384)
@@ -4,6 +4,7 @@
 package org.jboss.weld.extensions.util.properties;
 
 import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Field;
 import java.lang.reflect.Type;
 
@@ -43,9 +44,9 @@
       return field.getGenericType();
    }
    
-   public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
+   public AnnotatedElement getAnnotatedElement()
    {
-      return field.getAnnotation(annotationClass);
+      return field;
    }
    
    @SuppressWarnings("unchecked")

Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/MethodProperty.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/MethodProperty.java	2010-06-02 22:20:02 UTC (rev 6383)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/MethodProperty.java	2010-06-02 22:22:02 UTC (rev 6384)
@@ -5,6 +5,7 @@
 
 import java.beans.Introspector;
 import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Type;
@@ -55,9 +56,9 @@
       return getterMethod.getGenericReturnType();
    }
    
-   public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
+   public AnnotatedElement getAnnotatedElement()
    {
-      return getterMethod.getAnnotation(annotationClass);
+      return getterMethod;
    }
    
    public V getValue(Object instance)

Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/Property.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/Property.java	2010-06-02 22:20:02 UTC (rev 6383)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/Property.java	2010-06-02 22:22:02 UTC (rev 6384)
@@ -1,6 +1,7 @@
 package org.jboss.weld.extensions.util.properties;
 
 import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Type;
 
 /**
@@ -39,17 +40,10 @@
     * @return The property type
     */
    Class<V> getJavaClass();   
+      
+   AnnotatedElement getAnnotatedElement();
    
    /**
-    * Returns the specified annotation, if it exists on the bean property
-    * 
-    * @param <A>
-    * @param annotationClass
-    * @return
-    */
-   <A extends Annotation> A getAnnotation(Class<A> annotationClass);
-   
-   /**
     * Returns the property value for the specified bean. The property to be
     * returned is either a field or getter method.
     * 



More information about the weld-commits mailing list