|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.xml.bind.annotation.adapters.XmlAdapter<String,E>
net.sf.mmm.util.xml.base.jaxb.XmlAdapterEnum<E>
E - is the type of the enum.public abstract class XmlAdapterEnum<E extends Enum<E>>
This is an implementation of XmlAdapter for mapping Enums to
nice names.
| Constructor Summary | |
|---|---|
XmlAdapterEnum()
The constructor. |
|
| Method Summary | |
|---|---|
protected abstract Class<E> |
getEnumClass()
This method gets the Class reflecting the enum. |
String |
marshal(E value)
|
protected String |
normalize(String enumName)
This method normalizes the constant name of the
Enum. |
E |
unmarshal(String value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlAdapterEnum()
| Method Detail |
|---|
protected abstract Class<E> getEnumClass()
Class reflecting the enum.
public String marshal(E value)
throws Exception
marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<String,E extends Enum<E>>Exceptionprotected String normalize(String enumName)
name of the
Enum.
enumName - is the name.
public E unmarshal(String value)
throws Exception
unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<String,E extends Enum<E>>Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||