Class StaticFieldNameAdapter

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.Object>
org.opentrafficsim.xml.bindings.StaticFieldNameAdapter

public class StaticFieldNameAdapter
extends javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.Object>
StaticFieldNameAdapter converts between the XML String for a class name and the Class object.

Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Version:
$Revision$, $LastChangedDate$, by $Author$, initial version Apr 5, 2019
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Summary

    Constructors 
    Constructor Description
    StaticFieldNameAdapter()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String marshal​(java.lang.Object v)
    java.lang.Object unmarshal​(java.lang.String field)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • unmarshal

      public java.lang.Object unmarshal​(java.lang.String field) throws java.lang.Exception
      Specified by:
      unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.Object>
      Throws:
      java.lang.Exception
    • marshal

      public java.lang.String marshal​(java.lang.Object v) throws java.lang.Exception
      Specified by:
      marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.Object>
      Throws:
      java.lang.Exception