[webbeans-commits] Webbeans SVN: r930 - in ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans: introspector and 1 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Tue Jan 13 18:47:54 EST 2009


Author: pete.muir at jboss.org
Date: 2009-01-13 18:47:54 -0500 (Tue, 13 Jan 2009)
New Revision: 930

Modified:
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedMethodImpl.java
Log:
more fixes to generic types

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java	2009-01-13 23:42:38 UTC (rev 929)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java	2009-01-13 23:47:54 UTC (rev 930)
@@ -144,7 +144,7 @@
    private void validateObserverMethod()
    {
       // Make sure exactly one and only one parameter is annotated with Observes
-      List<AnnotatedParameter<Object>> eventObjects = this.observerMethod.getAnnotatedParameters(Observes.class);
+      List<AnnotatedParameter<?>> eventObjects = this.observerMethod.getAnnotatedParameters(Observes.class);
       if (eventObjects.size() > 1)
       {
          throw new DefinitionException(this + " is invalid because it contains more than event parameter");
@@ -153,14 +153,14 @@
       // variable or wildcard
       if (eventObjects.size() > 0)
       {
-         AnnotatedParameter<Object> eventParam = eventObjects.iterator().next();
+         AnnotatedParameter<?> eventParam = eventObjects.iterator().next();
          if (Reflections.isParameterizedType(eventParam.getType()))
          {
             throw new DefinitionException(this + " cannot observe parameterized event types");
          }
       }
       // Check for parameters annotated with @Disposes
-      List<AnnotatedParameter<Object>> disposeParams = this.observerMethod.getAnnotatedParameters(Disposes.class);
+      List<AnnotatedParameter<?>> disposeParams = this.observerMethod.getAnnotatedParameters(Disposes.class);
       if (disposeParams.size() > 0)
       {
          throw new DefinitionException(this + " cannot have any parameters annotated with @Dispose");

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java	2009-01-13 23:42:38 UTC (rev 929)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java	2009-01-13 23:47:54 UTC (rev 930)
@@ -48,7 +48,7 @@
     * @return A list of abstracted parameters with the given annotation type.
     *         Returns an empty set if there are no matches.
     */
-   public List<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> annotationType);
+   public List<AnnotatedParameter<?>> getAnnotatedParameters(Class<? extends Annotation> annotationType);
 
    /**
     * Creates a new instance of the class, using this constructor

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java	2009-01-13 23:42:38 UTC (rev 929)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java	2009-01-13 23:47:54 UTC (rev 930)
@@ -62,7 +62,7 @@
     * @return A set of matching parameter abstractions. Returns an empty list if
     *         there are no matches.
     */
-   public List<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> metaAnnotationType);
+   public List<AnnotatedParameter<?>> getAnnotatedParameters(Class<? extends Annotation> metaAnnotationType);
    
    /**
     * Get the parameter types as an array

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java	2009-01-13 23:42:38 UTC (rev 929)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java	2009-01-13 23:47:54 UTC (rev 930)
@@ -52,27 +52,27 @@
    /**
     * An annotation type -> list of annotations map
     */
-   protected class AnnotatedParameterMap extends ForwardingMap<Class<? extends Annotation>, List<AnnotatedParameter<Object>>>
+   protected class AnnotatedParameterMap extends ForwardingMap<Class<? extends Annotation>, List<AnnotatedParameter<?>>>
    {
-      private Map<Class<? extends Annotation>, List<AnnotatedParameter<Object>>> delegate;
+      private Map<Class<? extends Annotation>, List<AnnotatedParameter<?>>> delegate;
 
       public AnnotatedParameterMap()
       {
-         delegate = new HashMap<Class<? extends Annotation>, List<AnnotatedParameter<Object>>>();
+         delegate = new HashMap<Class<? extends Annotation>, List<AnnotatedParameter<?>>>();
       }
 
       @Override
-      protected Map<Class<? extends Annotation>, List<AnnotatedParameter<Object>>> delegate()
+      protected Map<Class<? extends Annotation>, List<AnnotatedParameter<?>>> delegate()
       {
          return delegate;
       }
 
-      public void put(Class<? extends Annotation> key, AnnotatedParameter<Object> value)
+      public void put(Class<? extends Annotation> key, AnnotatedParameter<?> value)
       {
-         List<AnnotatedParameter<Object>> parameters = super.get(key);
+         List<AnnotatedParameter<?>> parameters = super.get(key);
          if (parameters == null)
          {
-            parameters = new ArrayList<AnnotatedParameter<Object>>();
+            parameters = new ArrayList<AnnotatedParameter<?>>();
             super.put(key, parameters);
          }
          parameters.add(value);
@@ -85,10 +85,10 @@
       }
 
       @Override
-      public List<AnnotatedParameter<Object>> get(Object key)
+      public List<AnnotatedParameter<?>> get(Object key)
       {
-         List<AnnotatedParameter<Object>> parameters = super.get(key);
-         return parameters != null ? parameters : new ArrayList<AnnotatedParameter<Object>>();
+         List<AnnotatedParameter<?>> parameters = super.get(key);
+         return parameters != null ? parameters : new ArrayList<AnnotatedParameter<?>>();
       }
    }
 

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java	2009-01-13 23:42:38 UTC (rev 929)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedConstructorImpl.java	2009-01-13 23:47:54 UTC (rev 930)
@@ -171,7 +171,7 @@
     * 
     * @see org.jboss.webbeans.introspector.AnnotatedConstructor#getAnnotatedParameters(Class)
     */
-   public List<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> annotationType)
+   public List<AnnotatedParameter<?>> getAnnotatedParameters(Class<? extends Annotation> annotationType)
    {
       return Collections.unmodifiableList(annotatedParameters.get(annotationType));
    }

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedMethodImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedMethodImpl.java	2009-01-13 23:42:38 UTC (rev 929)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedMethodImpl.java	2009-01-13 23:47:54 UTC (rev 930)
@@ -196,7 +196,7 @@
     * @return The list of abstracted parameters with given annotation type
     *         present. An empty list is returned if there are no matches
     */
-   public List<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> annotationType)
+   public List<AnnotatedParameter<?>> getAnnotatedParameters(Class<? extends Annotation> annotationType)
    {
       return Collections.unmodifiableList(annotatedParameters.get(annotationType));
    }




More information about the weld-commits mailing list