A
org.apache.cocoon.woody.datatype.Datatype Datatype implementation for
types implementing Joshua Bloch's
typesafe enum pattern.
See the following code for an example:
package com.example;
public class Sex {
public static final Sex MALE = new Sex("M");
public static final Sex FEMALE = new Sex("F");
private String code;
private Sex(String code) { this.code = code; }
}
If your enumerated type does not provide a
java.lang.Object.toString method, the enum convertor will use the fully qualified class name,
followed by the name of the public static final field referring to
each instance, i.e. |