geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1227728 - in /geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder: MetaAnnotatedClass.java MetaAnnotatedConstructor.java MetaAnnotatedElement.java MetaAnnotatedField.java MetaAnnotatedMethod.java MetaAnnotatedObject.java
Date Thu, 05 Jan 2012 18:13:10 GMT
Author: dblevins
Date: Thu Jan  5 18:13:09 2012
New Revision: 1227728

URL: http://svn.apache.org/viewvc?rev=1227728&view=rev
Log:
Rename MetaAnnotatedObject to MetaAnnotatedElement and allow it to be used as a concrete class
to wrap any AnnotatedElement

Added:
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedElement.java
  (contents, props changed)
      - copied, changed from r1226549, geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedObject.java
Removed:
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedObject.java
Modified:
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedClass.java
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedConstructor.java
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedField.java
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedMethod.java

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedClass.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedClass.java?rev=1227728&r1=1227727&r2=1227728&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedClass.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedClass.java
Thu Jan  5 18:13:09 2012
@@ -29,16 +29,12 @@ import java.security.ProtectionDomain;
 /**
 * @version $Rev$ $Date$
 */
-public class MetaAnnotatedClass<T> extends MetaAnnotatedObject<Class<T>>
{
+public class MetaAnnotatedClass<T> extends MetaAnnotatedElement<Class<T>>
{
 
     public MetaAnnotatedClass(Class<T> clazz) {
         super(clazz, unroll(clazz));
     }
 
-    public Annotation[] getDeclaredAnnotations() {
-        return target.getDeclaredAnnotations();
-    }
-
     public MetaAnnotatedClass<?> forName(String className) throws ClassNotFoundException
{
         return to(target.forName(className));
     }

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedConstructor.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedConstructor.java?rev=1227728&r1=1227727&r2=1227728&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedConstructor.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedConstructor.java
Thu Jan  5 18:13:09 2012
@@ -22,7 +22,7 @@ import java.lang.reflect.Constructor;
 /**
  * @version $Rev$ $Date$
  */
-public class MetaAnnotatedConstructor<T> extends MetaAnnotatedObject<Constructor<T>>
implements AnnotatedMethod<Constructor<T>> {
+public class MetaAnnotatedConstructor<T> extends MetaAnnotatedElement<Constructor<T>>
implements AnnotatedMethod<Constructor<T>> {
 
     private Annotation[][] parameterAnnotations;
 
@@ -31,10 +31,6 @@ public class MetaAnnotatedConstructor<T>
         this.parameterAnnotations = unrollParameters(target.getParameterAnnotations());
     }
 
-    public Annotation[] getDeclaredAnnotations() {
-        return get().getDeclaredAnnotations();
-    }
-
     public Annotation[][] getParameterAnnotations() {
         return parameterAnnotations;
     }

Copied: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedElement.java
(from r1226549, geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedObject.java)
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedElement.java?p2=geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedElement.java&p1=geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedObject.java&r1=1226549&r2=1227728&rev=1227728&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedObject.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedElement.java
Thu Jan  5 18:13:09 2012
@@ -36,11 +36,11 @@ import static java.util.Arrays.asList;
 /**
 * @version $Rev$ $Date$
 */
-public abstract class MetaAnnotatedObject<T> implements MetaAnnotated<T> {
+public class MetaAnnotatedElement<T extends AnnotatedElement> implements  AnnotatedElement,
MetaAnnotated<T> {
     protected final Map<Class<? extends Annotation>, MetaAnnotation<?>>
annotations = new HashMap<Class<? extends Annotation>, MetaAnnotation<?>>();
     protected final T target;
 
-    MetaAnnotatedObject(T target, Map<Class<? extends Annotation>, MetaAnnotation<?>>
annotations) {
+    MetaAnnotatedElement(T target, Map<Class<? extends Annotation>, MetaAnnotation<?>>
annotations) {
         this.target = target;
         this.annotations.putAll(annotations);
     }
@@ -49,6 +49,10 @@ public abstract class MetaAnnotatedObjec
         return target;
     }
 
+    public Annotation[] getDeclaredAnnotations() {
+        return target.getDeclaredAnnotations();
+    }
+
     public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
{
         return annotations.containsKey(annotationClass);
     }

Propchange: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedElement.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedField.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedField.java?rev=1227728&r1=1227727&r2=1227728&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedField.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedField.java
Thu Jan  5 18:13:09 2012
@@ -22,16 +22,12 @@ import java.lang.reflect.Field;
 /**
 * @version $Rev$ $Date$
 */
-public class MetaAnnotatedField extends MetaAnnotatedObject<Field> implements AnnotatedMember<Field>
{
+public class MetaAnnotatedField extends MetaAnnotatedElement<Field> implements AnnotatedMember<Field>
{
 
     public MetaAnnotatedField(Field field) {
         super(field, unroll(field));
     }
 
-    public Annotation[] getDeclaredAnnotations() {
-        return get().getDeclaredAnnotations();
-    }
-
     public Class<?> getDeclaringClass() {
         return get().getDeclaringClass();
     }

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedMethod.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedMethod.java?rev=1227728&r1=1227727&r2=1227728&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedMethod.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/MetaAnnotatedMethod.java
Thu Jan  5 18:13:09 2012
@@ -22,7 +22,7 @@ import java.lang.reflect.Method;
 /**
 * @version $Rev$ $Date$
 */
-public class MetaAnnotatedMethod extends MetaAnnotatedObject<Method> implements AnnotatedMethod<Method>
{
+public class MetaAnnotatedMethod extends MetaAnnotatedElement<Method> implements AnnotatedMethod<Method>
{
 
     private final Annotation[][] parameterAnnotations;
 
@@ -32,10 +32,6 @@ public class MetaAnnotatedMethod extends
         this.parameterAnnotations = unrollParameters(method.getParameterAnnotations());
     }
 
-    public Annotation[] getDeclaredAnnotations() {
-        return target.getDeclaredAnnotations();
-    }
-
     public Annotation[][] getParameterAnnotations() {
         return parameterAnnotations;
     }



Mime
View raw message