Author: khmarbaise
Date: Sat Oct 11 18:31:32 2014
New Revision: 1631098
URL: http://svn.apache.org/r1631098
Log:
- Added information about enum types for parameters.
Modified:
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt
Modified:
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt
URL:
http://svn.apache.org/viewvc/maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt?rev=1631098&r1=1631097&r2=1631098&view=diff
==============================================================================
---
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt
(original)
+++
maven/site/trunk/content/apt/guides/plugin/guide-java-plugin-development.apt
Sat Oct 11 18:31:32 2014
@@ -508,6 +508,44 @@ mvn archetype:generate \
Once the type for the element is defined, the text in the XML file is
converted to the appropriate type of object
+*** Enums
+
+ Enumeration type parameters can also be used. First you need to define
+ your enumeration type and afterwards you can use the enumeration type
+ in the parameter definition:
+
++-----+
+ public enum Color {
+ green,
+ rot,
+ blue
+ }
+
+ /**
+ * My Enum
+ */
+ @Parameter
+ private Color myColor;
++-----+
+
+ You can also use elements from the enumeration type as defaultValues like the
+ following:
+
++-----+
+ public enum Color {
+ green,
+ rot,
+ blue
+ }
+
+ /**
+ * My Enum
+ */
+ @Parameter(defaultValue = "green")
+ private Color myColor;
++-----+
+
+
*** Arrays
Array type parameters are configured by specifying the parameter multiple