You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bval.apache.org by si...@apache.org on 2010/04/01 12:52:22 UTC
svn commit: r929917 -
/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java
Author: simonetripodi
Date: Thu Apr 1 10:52:22 2010
New Revision: 929917
URL: http://svn.apache.org/viewvc?rev=929917&view=rev
Log:
added generics parameters
Modified:
incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java
Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java?rev=929917&r1=929916&r2=929917&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java (original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java Thu Apr 1 10:52:22 2010
@@ -39,13 +39,13 @@ public class AnnotationProxy implements
private final Class<? extends Annotation> annotationType;
private final Map<String, Object> values;
- public AnnotationProxy(AnnotationProxyBuilder descriptor) {
+ public <A extends Annotation> AnnotationProxy(AnnotationProxyBuilder<A> descriptor) {
this.annotationType = descriptor.getType();
values = getAnnotationValues(descriptor);
}
- private Map<String, Object> getAnnotationValues(AnnotationProxyBuilder descriptor) {
- Map<String, Object> result = new HashMap();
+ private <A extends Annotation> Map<String, Object> getAnnotationValues(AnnotationProxyBuilder<A> descriptor) {
+ Map<String, Object> result = new HashMap<String, Object>();
int processedValuesFromDescriptor = 0;
final Method[] declaredMethods = SecureActions.getDeclaredMethods(annotationType);
for (Method m : declaredMethods) {
@@ -90,7 +90,7 @@ public class AnnotationProxy implements
}
private SortedSet<String> getMethodsSorted() {
- SortedSet<String> result = new TreeSet();
+ SortedSet<String> result = new TreeSet<String>();
result.addAll(values.keySet());
return result;
}