changeset 828:55aa4c748a0e

Javadocs for @Param should mention enums.
author shade
date Wed, 25 Jun 2014 17:27:28 +0400
parents 7ee95e9cf56c
children 9b0fae2b911c
files jmh-core/src/main/java/org/openjdk/jmh/annotations/Param.java
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/annotations/Param.java	Wed Jun 25 17:24:04 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/annotations/Param.java	Wed Jun 25 17:27:28 2014 +0400
@@ -40,8 +40,13 @@
  * in any instance initializer and/or constructor of {@link State}.</p>
  *
  * <p>Parameters are acceptable on any primitive type, primitive wrapper type,
- * or a String. The annotation value is given in String, and will be
- * valueOf-ed as required to match the field type.</p>
+ * a String, or an Enum. The annotation value is given in String, and will be
+ * coerced as required to match the field type.</p>
+ *
+ * <p>Parameters should normally provide the default values which make
+ * benchmark runnable even without the explicit parameters set for the run.
+ * The only exception is {@link Param} over {@link java.lang.Enum}, which
+ * will implicitly have the default value set encompassing all enum constants.</p>
  *
  * <p>When multiple {@link Param}-s are needed for the benchmark run,
  * JMH will compute the outer product of all the parameters in the run.</p>