You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bval.apache.org by mb...@apache.org on 2010/09/08 04:39:30 UTC
svn commit: r993589 -
/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java
Author: mbenson
Date: Wed Sep 8 02:39:30 2010
New Revision: 993589
URL: http://svn.apache.org/viewvc?rev=993589&view=rev
Log:
restrict access; format; organize imports
Modified:
incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java
Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java?rev=993589&r1=993588&r2=993589&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java (original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java Wed Sep 8 02:39:30 2010
@@ -16,9 +16,6 @@
*/
package org.apache.bval.jsr303.xml;
-
-import org.apache.bval.jsr303.util.SecureActions;
-
import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationHandler;
@@ -28,16 +25,17 @@ import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
+import org.apache.bval.jsr303.util.SecureActions;
/**
* Description: <br/>
- * InvocationHandler implementation of <code>Annotation</code> that pretends it is a
- * "real" source code annotation.
+ * InvocationHandler implementation of <code>Annotation</code> that pretends it
+ * is a "real" source code annotation.
* <p/>
*/
-//TODO confirm that this class must be public for RT invocation purposes, then document this fact
-//TODO move this guy up to org.apache.bval.jsr303 or org.apache.bval.jsr303.model
-public class AnnotationProxy implements Annotation, InvocationHandler, Serializable {
+// TODO move this guy up to org.apache.bval.jsr303 or
+// org.apache.bval.jsr303.model
+class AnnotationProxy implements Annotation, InvocationHandler, Serializable {
/** Serialization version */
private static final long serialVersionUID = 1L;
@@ -47,6 +45,7 @@ public class AnnotationProxy implements
/**
* Create a new AnnotationProxy instance.
+ *
* @param <A>
* @param descriptor
*/
@@ -70,8 +69,7 @@ public class AnnotationProxy implements
}
}
if (processedValuesFromDescriptor != descriptor.size()) {
- throw new RuntimeException(
- "Trying to instanciate " + annotationType + " with unknown paramters.");
+ throw new RuntimeException("Trying to instanciate " + annotationType + " with unknown paramters.");
}
return result;
}
@@ -101,7 +99,8 @@ public class AnnotationProxy implements
result.append('@').append(annotationType().getName()).append('(');
boolean comma = false;
for (String m : getMethodsSorted()) {
- if (comma) result.append(", ");
+ if (comma)
+ result.append(", ");
result.append(m).append('=').append(values.get(m));
comma = true;
}
@@ -115,4 +114,3 @@ public class AnnotationProxy implements
return result;
}
}
-