Package org.opentrafficsim.xml.bindings
Class ClassNameAdapter
-
public class ClassNameAdapter extends javax.xml.bind.annotation.adapters.XmlAdapter<String,Class<?>>
ClassNameAdapter converts between the XML String for a class name and the Class object.Copyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck
-
-
Constructor Summary
Constructors Constructor Description ClassNameAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringmarshal(Class<?> clazz)Class<?>unmarshal(String field)
-
-
-
Method Detail
-
unmarshal
public Class<?> unmarshal(String field) throws IllegalArgumentException
- Specified by:
unmarshalin classjavax.xml.bind.annotation.adapters.XmlAdapter<String,Class<?>>- Throws:
IllegalArgumentException
-
marshal
public String marshal(Class<?> clazz) throws IllegalArgumentException
- Specified by:
marshalin classjavax.xml.bind.annotation.adapters.XmlAdapter<String,Class<?>>- Throws:
IllegalArgumentException
-
-