[hibernate-commits] Hibernate SVN: r17590 - in beanvalidation/api/trunk/src/main/java/javax/validation: constraints and 1 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Wed Sep 30 14:11:35 EDT 2009


Author: epbernard
Date: 2009-09-30 14:11:35 -0400 (Wed, 30 Sep 2009)
New Revision: 17590

Modified:
   beanvalidation/api/trunk/src/main/java/javax/validation/ConstraintViolationException.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/AssertFalse.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/AssertTrue.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/DecimalMax.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/DecimalMin.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Digits.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Future.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Max.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Min.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/NotNull.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Null.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Past.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Pattern.java
   beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Size.java
   beanvalidation/api/trunk/src/main/java/javax/validation/metadata/BeanDescriptor.java
   beanvalidation/api/trunk/src/main/java/javax/validation/metadata/ConstraintDescriptor.java
   beanvalidation/api/trunk/src/main/java/javax/validation/metadata/ElementDescriptor.java
   beanvalidation/api/trunk/src/main/java/javax/validation/metadata/PropertyDescriptor.java
Log:
Enhance JavaDoc

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/ConstraintViolationException.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/ConstraintViolationException.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/ConstraintViolationException.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -20,7 +20,7 @@
 import java.util.Set;
 
 /**
- * Report the result of constraint violations
+ * Reports the result of constraint violations
  *                                                    `
  * @author Emmanuel Bernard
  */
@@ -31,7 +31,7 @@
 	 * Creates a constraint violation report
 	 *
 	 * @param message error message
-	 * @param constraintViolations Set of ConstraintViolation
+	 * @param constraintViolations <code>Set</code> of <code>ConstraintViolation</code>
 	 */
 	public ConstraintViolationException(String message,
 										Set<ConstraintViolation<?>> constraintViolations) {
@@ -42,7 +42,7 @@
 	/**
 	 * Creates a constraint violation report
 	 *
-	 * @param constraintViolations Set of ConstraintViolation
+	 * @param constraintViolations <code>Set</code> of <code>ConstraintViolation</code>
 	 */
 	public ConstraintViolationException(Set<ConstraintViolation<?>> constraintViolations) {
 		super();
@@ -52,7 +52,7 @@
 	/**
 	 * Set of constraint violations reported during a validation
 	 *
-	 * @return Set of CosntraintViolation
+	 * @return <code>Set</code> of <code>ConstraintViolation</code>
 	 */
 	public Set<ConstraintViolation<?>> getConstraintViolations() {
 		return constraintViolations;

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/AssertFalse.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/AssertFalse.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/AssertFalse.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -49,7 +49,7 @@
 	Class<? extends Payload>[] payload() default {};
 
 	/**
-	 * Defines several @AssertFalse annotations on the same element
+	 * Defines several <code>@AssertFalse</code> annotations on the same element
 	 * @see javax.validation.constraints.AssertFalse
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/AssertTrue.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/AssertTrue.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/AssertTrue.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -46,7 +46,7 @@
 	Class<? extends Payload>[] payload() default {};
 
 	/**
-	 * Defines several @AssertTrue annotations on the same element
+	 * Defines several <code>@AssertTrue</code> annotations on the same element
 	 * @see AssertTrue
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/DecimalMax.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/DecimalMax.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/DecimalMax.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -57,15 +57,15 @@
 	Class<? extends Payload>[] payload() default {};
 
 	/**
-	 * The String representation of the max value according to the
-	 * BigDecimal string representation
+	 * The <code>String</code> representation of the max value according to the
+	 * <code>BigDecimal</code> string representation
 	 *
 	 * @return value the element must be lower or equal to
 	 */
 	String value();
 
 	/**
-	 * Defines several @DecimalMax annotations on the same element
+	 * Defines several <code>@DecimalMax</code> annotations on the same element
 	 *
 	 * @author Emmanuel Bernard
 	 * @see DecimalMax

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/DecimalMin.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/DecimalMin.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/DecimalMin.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -57,14 +57,14 @@
 	Class<? extends Payload>[] payload() default {};
 
 	/**
-	 * The String representation of the min value according to the
-	 * BigDecimal string representation
+	 * The <code>String</code> representation of the min value according to the
+	 * <code>BigDecimal</code> string representation
 	 * @return value the element must be higher or equal to
 	 */
 	String value();
 
 	/**
-	 * Defines several @DecimalMin annotations on the same element
+	 * Defines several <code>@DecimalMin</code> annotations on the same element
 	 * @see DecimalMin
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Digits.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Digits.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Digits.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -63,7 +63,7 @@
 	int fraction();
 
 	/**
-	 * Defines several @Digits annotations on the same element
+	 * Defines several <code>@Digits</code> annotations on the same element
 	 * @see Digits
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Future.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Future.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Future.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -54,7 +54,7 @@
 	Class<? extends Payload>[] payload() default {};
 
 	/**
-	 * Defines several @Future annotations on the same element
+	 * Defines several <code>@Future</code> annotations on the same element
 	 * @see Future
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Max.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Max.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Max.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -61,7 +61,7 @@
 	long value();
 
 	/**
-	 * Defines several @Max annotations on the same element
+	 * Defines several <code>@Max</code> annotations on the same element
 	 * @see Max
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Min.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Min.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Min.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -61,7 +61,7 @@
 	long value();
 
 	/**
-	 * Defines several @Min annotations on the same element
+	 * Defines several <code>@Min</code> annotations on the same element
 	 * @see Min
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/NotNull.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/NotNull.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/NotNull.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -44,7 +44,7 @@
 	Class<? extends Payload>[] payload() default {};
 
 	/**
-	 * Defines several @NotNull annotations on the same element
+	 * Defines several <code>@NotNull</code> annotations on the same element
 	 * @see javax.validation.constraints.NotNull
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Null.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Null.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Null.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -27,7 +27,7 @@
 import javax.validation.Payload;
 
 /**
- * The annotated element must be null.
+ * The annotated element must be <code>null</code>.
  * Accepts any type.
  *
  * @author Emmanuel Bernard
@@ -44,7 +44,7 @@
 	Class<? extends Payload>[] payload() default {};
 
 	/**
-	 * Defines several @Null annotations on the same element
+	 * Defines several <code>@Null</code> annotations on the same element
 	 * @see javax.validation.constraints.Null
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Past.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Past.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Past.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -54,7 +54,7 @@
 	Class<? extends Payload>[] payload() default {};
 
 	/**
-	 * Defines several @Past annotations on the same element
+	 * Defines several <code>@Past</code> annotations on the same element
 	 * @see Past
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Pattern.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Pattern.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Pattern.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -46,7 +46,7 @@
 	String regexp();
 
 	/**
-	 * @return Array of <code>Flag</code> enumeration instances considered when resolving the regular expression.
+	 * @return Array of <code>Flag</code>s considered when resolving the regular expression.
 	 */
 	Flag[] flags() default {};
 
@@ -128,7 +128,7 @@
 	}
 
 	/**
-	 * Defines several @Pattern annotations on the same element
+	 * Defines several <code>@Pattern</code> annotations on the same element
 	 * @see Pattern
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Size.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Size.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/constraints/Size.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -62,7 +62,7 @@
 	int max() default Integer.MAX_VALUE;
 
 	/**
-	 * Defines several @Size annotations on the same element
+	 * Defines several <code>@Size</code> annotations on the same element
 	 * @see Size
 	 *
 	 * @author Emmanuel Bernard

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/metadata/BeanDescriptor.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/metadata/BeanDescriptor.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/metadata/BeanDescriptor.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -20,17 +20,17 @@
 import java.util.Set;
 
 /**
- * Describe a constrained Java Bean and the constraints associated to it.
+ * Describes a constrained Java Bean and the constraints associated to it.
  *
  * @author Emmanuel Bernard
  */
 public interface BeanDescriptor extends ElementDescriptor {
 	/**
-	 * Returns true if the bean involves validation:
+	 * Returns <code>true</code> if the bean involves validation:
 	 * <ul>
 	 * <li> a constraint is hosted on the bean itself </li>
-	 * <li> a constraint is hosted on one of the bean properties </li>
-	 * <li> or a bean property is marked for cascade (@Valid) </li>
+	 * <li> a constraint is hosted on one of the bean properties</li>
+	 * <li> or a bean property is marked for cascade (<code>@Valid</code>)</li>
 	 * </ul>
 	 *
 	 * @return <code>true</code> if the bean involves validation, <code>false</code> otherwise.
@@ -42,7 +42,7 @@
 	 * Return <code>null</code> if the property does not exist or has no
 	 * constraint nor is marked as cascaded (see {@link #getConstrainedProperties()} )
 	 * <p/>
-	 * The returned object (and associated objects including ConstraintDescriptors)
+	 * The returned object (and associated objects including <code>ConstraintDescriptor</code>s)
 	 * are immutable.
 	 *
 	 * @param propertyName property evaluated
@@ -54,8 +54,9 @@
 	PropertyDescriptor getConstraintsForProperty(String propertyName);
 
 	/**
-	 * @return the property descriptors having at least one constraint defined or which are marked
-	 *         as cascaded (@Valid) or an empty set.
+	 * Returns a set of property descriptors having at least one constraint defined
+	 * or marked as cascaded (<code>@Valid<c/ode>). If not property matches,
+	 * an empty set is returned.
 	 */
 	Set<PropertyDescriptor> getConstrainedProperties();
 }

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/metadata/ConstraintDescriptor.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/metadata/ConstraintDescriptor.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/metadata/ConstraintDescriptor.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -26,7 +26,7 @@
 
 /**
  * Describes a single constraint and its composing constraints.
- * T is the constraint's annotation type.
+ * <code>T</code> is the constraint's annotation type.
  *
  * @author Emmanuel Bernard
  * @author Hardy Ferentschik
@@ -42,7 +42,7 @@
 	T getAnnotation();
 
 	/**
-	 * The Set of groups the constraint is applied on.
+	 * The set of groups the constraint is applied on.
 	 * If the constraint declares no group, a set with only the <code>Default</code>
 	 * group is returned.
 	 *
@@ -51,14 +51,14 @@
 	Set<Class<?>> getGroups();
 
 	/**
-	 * The Set of payload the constraint hosts.
+	 * The set of payload the constraint hosts.
 	 *
 	 * @return payload classes hosted on the constraint or an empty set if none.
 	 */
 	Set<Class<? extends Payload>> getPayload();
 
 	/**
-	 * Immutable list of the constraint validation implementation classes.
+	 * List of the constraint validation implementation classes.
 	 *
 	 * @return list of the constraint validation implementation classes.
 	 */
@@ -88,7 +88,7 @@
 	Set<ConstraintDescriptor<?>> getComposingConstraints();
 
 	/**
-	 * @return true if the constraint is annotated with @ReportAsSingleViolation
+	 * @return true if the constraint is annotated with <code>@ReportAsSingleViolation</code>
 	 */
 	boolean isReportAsSingleViolation();
 }
\ No newline at end of file

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/metadata/ElementDescriptor.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/metadata/ElementDescriptor.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/metadata/ElementDescriptor.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -40,9 +40,9 @@
 
 	/**
 	 * Return all constraint descriptors for this element or an
-	 * empty Set if none are present.
+	 * empty <code>Set</code> if none are present.
 	 *
-	 * @return Set of constraint descriptors for this element
+	 * @return <code>Set</code> of constraint descriptors for this element
 	 */
 	Set<ConstraintDescriptor<?>> getConstraintDescriptors();
 
@@ -50,9 +50,9 @@
 	 * Return the list of matching constraints for a given set of groups for this element.
 	 *
 	 * This method respects group sequences and group inheritance (including
-	 * class-level Default group overriding) but does not return ConstraintDescriptors
-	 * in any particular order. Specifically, ordering of the group sequence is not
-	 * respected.
+	 * class-level <code>Default</code> group overriding) but does not return
+	 * <code>ConstraintDescriptor</code>s in any particular order.
+	 * Specifically, ordering of the group sequence is not respected.
 	 *
 	 * @param groups groups targeted
 	 * @return list of matching ConstraintDescriptors

Modified: beanvalidation/api/trunk/src/main/java/javax/validation/metadata/PropertyDescriptor.java
===================================================================
--- beanvalidation/api/trunk/src/main/java/javax/validation/metadata/PropertyDescriptor.java	2009-09-30 17:36:15 UTC (rev 17589)
+++ beanvalidation/api/trunk/src/main/java/javax/validation/metadata/PropertyDescriptor.java	2009-09-30 18:11:35 UTC (rev 17590)
@@ -21,7 +21,7 @@
  * Describes a Java Bean property hosting validation constraints.
  *
  * Constraints placed on the attribute and the getter of a given property
- * are all referenced by this object.
+ * are all referenced.
  *
  * @author Emmanuel Bernard
  */



More information about the hibernate-commits mailing list