[webbeans-commits] Webbeans SVN: r271 - in ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans: injectable and 2 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Thu Nov 6 22:45:58 EST 2008
Author: gavin.king at jboss.com
Date: 2008-11-06 22:45:58 -0500 (Thu, 06 Nov 2008)
New Revision: 271
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/ForwardingInjectableMethod.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Invokable.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/impl/SimpleAnnotatedConstructor.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/impl/SimpleAnnotatedMethod.java
Log:
the parameters of a method or constructor are a List!
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 2008-11-06 20:01:03 UTC (rev 270)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2008-11-07 03:45:58 UTC (rev 271)
@@ -2,7 +2,7 @@
import java.lang.annotation.Annotation;
import java.util.Iterator;
-import java.util.Set;
+import java.util.List;
import javax.webbeans.Current;
import javax.webbeans.Observer;
@@ -15,7 +15,7 @@
import org.jboss.webbeans.model.bean.BeanModel;
import com.google.common.collect.ForwardingIterator;
-import com.google.common.collect.ForwardingSet;
+import com.google.common.collect.ForwardingList;
/**
* <p>
@@ -92,11 +92,11 @@
{
@Override
- public Set<InjectableParameter<Object>> getParameters()
+ public List<InjectableParameter<Object>> getParameters()
{
- final Set<InjectableParameter<Object>>parameters = super.getParameters();
+ final List<InjectableParameter<Object>>parameters = super.getParameters();
- return new ForwardingSet<InjectableParameter<Object>>()
+ return new ForwardingList<InjectableParameter<Object>>()
{
@Override
@@ -143,7 +143,7 @@
}
@Override
- protected Set<InjectableParameter<Object>> delegate()
+ protected List<InjectableParameter<Object>> delegate()
{
return parameters;
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/ForwardingInjectableMethod.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/ForwardingInjectableMethod.java 2008-11-06 20:01:03 UTC (rev 270)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/ForwardingInjectableMethod.java 2008-11-07 03:45:58 UTC (rev 271)
@@ -1,6 +1,6 @@
package org.jboss.webbeans.injectable;
-import java.util.Set;
+import java.util.List;
import javax.webbeans.manager.Manager;
@@ -23,7 +23,7 @@
}
@Override
- public Set<InjectableParameter<Object>> getParameters()
+ public List<InjectableParameter<Object>> getParameters()
{
return delegate().getParameters();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Invokable.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Invokable.java 2008-11-06 20:01:03 UTC (rev 270)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injectable/Invokable.java 2008-11-07 03:45:58 UTC (rev 271)
@@ -1,8 +1,8 @@
package org.jboss.webbeans.injectable;
-import java.util.HashSet;
+import java.util.ArrayList;
import java.util.Iterator;
-import java.util.Set;
+import java.util.List;
import javax.webbeans.manager.Manager;
@@ -12,13 +12,13 @@
public abstract class Invokable<T, S>
{
- private Set<InjectableParameter<Object>> parameters;
+ private List<InjectableParameter<Object>> parameters;
protected Invokable() {}
- public Invokable(Set<AnnotatedParameter<Object>> parameters)
+ public Invokable(List<AnnotatedParameter<Object>> parameters)
{
- this.parameters = new HashSet<InjectableParameter<Object>>();
+ this.parameters = new ArrayList<InjectableParameter<Object>>();
for (AnnotatedParameter<Object> parameter : parameters)
{
this.parameters.add(new InjectableParameter<Object>(parameter));
@@ -38,7 +38,7 @@
return parameterValues;
}
- public Set<InjectableParameter<Object>> getParameters()
+ public List<InjectableParameter<Object>> getParameters()
{
return parameters;
}
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 2008-11-06 20:01:03 UTC (rev 270)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java 2008-11-07 03:45:58 UTC (rev 271)
@@ -2,7 +2,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
-import java.util.Set;
+import java.util.List;
/**
* AnnotatedType provides a uniform access to the annotations on an annotated
@@ -16,8 +16,8 @@
public Constructor<T> getAnnotatedConstructor();
- public Set<AnnotatedParameter<Object>> getParameters();
+ public List<AnnotatedParameter<Object>> getParameters();
- public Set<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> metaAnnotationType);
+ public List<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> metaAnnotationType);
}
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 2008-11-06 20:01:03 UTC (rev 270)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java 2008-11-07 03:45:58 UTC (rev 271)
@@ -2,7 +2,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
-import java.util.Set;
+import java.util.List;
/**
* AnnotatedType provides a uniform access to the annotations on an annotated
@@ -16,8 +16,8 @@
public Method getAnnotatedMethod();
- public Set<AnnotatedParameter<Object>> getParameters();
+ public List<AnnotatedParameter<Object>> getParameters();
- public Set<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> metaAnnotationType);
+ public List<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> metaAnnotationType);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/impl/SimpleAnnotatedConstructor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/impl/SimpleAnnotatedConstructor.java 2008-11-06 20:01:03 UTC (rev 270)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/impl/SimpleAnnotatedConstructor.java 2008-11-07 03:45:58 UTC (rev 271)
@@ -3,10 +3,10 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Type;
+import java.util.ArrayList;
import java.util.HashMap;
-import java.util.HashSet;
+import java.util.List;
import java.util.Map;
-import java.util.Set;
import org.jboss.webbeans.introspector.AnnotatedConstructor;
import org.jboss.webbeans.introspector.AnnotatedParameter;
@@ -18,8 +18,8 @@
private Constructor<T> constructor;
- private Set<AnnotatedParameter<Object>> parameters;
- private Map<Class<? extends Annotation>, Set<AnnotatedParameter<Object>>> annotatedParameters;
+ private List<AnnotatedParameter<Object>> parameters;
+ private Map<Class<? extends Annotation>, List<AnnotatedParameter<Object>>> annotatedParameters;
public SimpleAnnotatedConstructor(Constructor<T> constructor)
{
@@ -47,7 +47,7 @@
return actualTypeArguments;
}
- public Set<AnnotatedParameter<Object>> getParameters()
+ public List<AnnotatedParameter<Object>> getParameters()
{
if (parameters == null)
{
@@ -58,7 +58,7 @@
private void initParameters()
{
- this.parameters = new HashSet<AnnotatedParameter<Object>>();
+ this.parameters = new ArrayList<AnnotatedParameter<Object>>();
for (int i = 0; i < constructor.getParameterTypes().length; i++)
{
if (constructor.getParameterAnnotations()[i].length > 0)
@@ -76,7 +76,7 @@
}
}
- public Set<AnnotatedParameter<Object>> getAnnotatedMethods(Class<? extends Annotation> annotationType)
+ public List<AnnotatedParameter<Object>> getAnnotatedMethods(Class<? extends Annotation> annotationType)
{
if (annotatedParameters == null)
{
@@ -85,7 +85,7 @@
if (!annotatedParameters.containsKey(annotationType))
{
- return new HashSet<AnnotatedParameter<Object>>();
+ return new ArrayList<AnnotatedParameter<Object>>();
}
else
{
@@ -99,21 +99,21 @@
{
initParameters();
}
- annotatedParameters = new HashMap<Class<? extends Annotation>, Set<AnnotatedParameter<Object>>>();
+ annotatedParameters = new HashMap<Class<? extends Annotation>, List<AnnotatedParameter<Object>>>();
for (AnnotatedParameter<Object> parameter : parameters)
{
for (Annotation annotation : parameter.getAnnotations())
{
if (!annotatedParameters.containsKey(annotation))
{
- annotatedParameters.put(annotation.annotationType(), new HashSet<AnnotatedParameter<Object>>());
+ annotatedParameters.put(annotation.annotationType(), new ArrayList<AnnotatedParameter<Object>>());
}
annotatedParameters.get(annotation.annotationType()).add(parameter);
}
}
}
- public Set<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> annotationType)
+ public List<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> annotationType)
{
if (annotatedParameters == null)
{
@@ -121,7 +121,7 @@
}
if (!annotatedParameters.containsKey(annotationType))
{
- return new HashSet<AnnotatedParameter<Object>>();
+ return new ArrayList<AnnotatedParameter<Object>>();
}
return annotatedParameters.get(annotationType);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/impl/SimpleAnnotatedMethod.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/impl/SimpleAnnotatedMethod.java 2008-11-06 20:01:03 UTC (rev 270)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/impl/SimpleAnnotatedMethod.java 2008-11-07 03:45:58 UTC (rev 271)
@@ -4,10 +4,10 @@
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
+import java.util.ArrayList;
import java.util.HashMap;
-import java.util.HashSet;
+import java.util.List;
import java.util.Map;
-import java.util.Set;
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.AnnotatedParameter;
@@ -19,8 +19,8 @@
private Method method;
- private Set<AnnotatedParameter<Object>> parameters;
- private Map<Class<? extends Annotation>, Set<AnnotatedParameter<Object>>> annotatedParameters;
+ private List<AnnotatedParameter<Object>> parameters;
+ private Map<Class<? extends Annotation>, List<AnnotatedParameter<Object>>> annotatedParameters;
public SimpleAnnotatedMethod(Method method)
{
@@ -52,7 +52,7 @@
return actualTypeArgements;
}
- public Set<AnnotatedParameter<Object>> getParameters()
+ public List<AnnotatedParameter<Object>> getParameters()
{
if (parameters == null)
{
@@ -63,7 +63,7 @@
private void initParameters()
{
- this.parameters = new HashSet<AnnotatedParameter<Object>>();
+ this.parameters = new ArrayList<AnnotatedParameter<Object>>();
for (int i = 0; i < method.getParameterTypes().length; i++)
{
if (method.getParameterAnnotations()[i].length > 0)
@@ -81,7 +81,7 @@
}
}
- public Set<AnnotatedParameter<Object>> getAnnotatedMethods(Class<? extends Annotation> annotationType)
+ public List<AnnotatedParameter<Object>> getAnnotatedMethods(Class<? extends Annotation> annotationType)
{
if (annotatedParameters == null)
{
@@ -90,7 +90,7 @@
if (!annotatedParameters.containsKey(annotationType))
{
- return new HashSet<AnnotatedParameter<Object>>();
+ return new ArrayList<AnnotatedParameter<Object>>();
}
else
{
@@ -104,21 +104,21 @@
{
initParameters();
}
- annotatedParameters = new HashMap<Class<? extends Annotation>, Set<AnnotatedParameter<Object>>>();
+ annotatedParameters = new HashMap<Class<? extends Annotation>, List<AnnotatedParameter<Object>>>();
for (AnnotatedParameter<Object> parameter : parameters)
{
for (Annotation annotation : parameter.getAnnotations())
{
if (!annotatedParameters.containsKey(annotation))
{
- annotatedParameters.put(annotation.annotationType(), new HashSet<AnnotatedParameter<Object>>());
+ annotatedParameters.put(annotation.annotationType(), new ArrayList<AnnotatedParameter<Object>>());
}
annotatedParameters.get(annotation.annotationType()).add(parameter);
}
}
}
- public Set<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> annotationType)
+ public List<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> annotationType)
{
if (annotatedParameters == null)
{
@@ -126,7 +126,7 @@
}
if (!annotatedParameters.containsKey(annotationType))
{
- return new HashSet<AnnotatedParameter<Object>>();
+ return new ArrayList<AnnotatedParameter<Object>>();
}
return annotatedParameters.get(annotationType);
}
More information about the weld-commits
mailing list