incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r929907 - in /incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303: AppendValidation.java AppendValidationToBuilder.java AppendValidationToMeta.java extensions/AppendValidationToList.java
Date Thu, 01 Apr 2010 10:16:32 GMT
Author: simonetripodi
Date: Thu Apr  1 10:16:31 2010
New Revision: 929907

URL: http://svn.apache.org/viewvc?rev=929907&view=rev
Log:
fixed AppendValidation hierarchy generics type 

Modified:
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidation.java
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidationToBuilder.java
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidationToMeta.java
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/AppendValidationToList.java

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidation.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidation.java?rev=929907&r1=929906&r2=929907&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidation.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidation.java
Thu Apr  1 10:16:31 2010
@@ -16,9 +16,11 @@
  */
 package org.apache.bval.jsr303;
 
+import java.lang.annotation.Annotation;
+
 /**
  * Description: <br/>
  */
 public interface AppendValidation {
-     void append(ConstraintValidation validation);
+    <T extends Annotation> void append(ConstraintValidation<T> validation);
 }

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidationToBuilder.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidationToBuilder.java?rev=929907&r1=929906&r2=929907&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidationToBuilder.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidationToBuilder.java
Thu Apr  1 10:16:31 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.bval.jsr303;
 
+import java.lang.annotation.Annotation;
+
 /**
  * Description: <br/>
  */
@@ -26,7 +28,7 @@ public class AppendValidationToBuilder i
         this.builder = builder;
     }
 
-    public void append(ConstraintValidation validation) {
+    public <T extends Annotation> void append(ConstraintValidation<T> validation)
{
         builder.addComposed(validation);
     }
 }

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidationToMeta.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidationToMeta.java?rev=929907&r1=929906&r2=929907&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidationToMeta.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/AppendValidationToMeta.java
Thu Apr  1 10:16:31 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.bval.jsr303;
 
+import java.lang.annotation.Annotation;
+
 import org.apache.bval.model.FeaturesCapable;
 
 /**
@@ -28,7 +30,7 @@ public class AppendValidationToMeta impl
         this.feature = meta;
     }
 
-    public void append(ConstraintValidation validation) {
+    public <T extends Annotation> void append(ConstraintValidation<T> validation)
{
         feature.addValidation(validation);
     }
 }

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/AppendValidationToList.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/AppendValidationToList.java?rev=929907&r1=929906&r2=929907&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/AppendValidationToList.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/extensions/AppendValidationToList.java
Thu Apr  1 10:16:31 2010
@@ -17,6 +17,7 @@
 package org.apache.bval.jsr303.extensions;
 
 
+import java.lang.annotation.Annotation;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -27,16 +28,16 @@ import org.apache.bval.jsr303.Constraint
  * Description: <br/>
  */
 public class AppendValidationToList implements AppendValidation {
-    private final List<ConstraintValidation> validations = new ArrayList();
+    private final List<ConstraintValidation<? extends Annotation>> validations
= new ArrayList<ConstraintValidation<? extends Annotation>>();
 
     public AppendValidationToList() {
     }
 
-    public void append(ConstraintValidation validation) {
+    public <T extends Annotation> void append(ConstraintValidation<T> validation)
{
         validations.add(validation);
     }
 
-    public List<ConstraintValidation> getValidations() {        
+    public List<ConstraintValidation<? extends Annotation>> getValidations()
{
         return validations;
     }
 }



Mime
View raw message