程序包 weka.core.xml

类 XMLSerializationMethodHandler

java.lang.Object
weka.core.xml.XMLSerializationMethodHandler
所有已实现的接口:
RevisionHandler

public class XMLSerializationMethodHandler extends Object implements RevisionHandler
This class handles relationships between display names of properties (or classes) and Methods that are associated with them. It differentiates between read and write methods. It automatically stores public methods that have the same signature as the readFromXML() and writeToXML() methods in the XMLSerialization class.
版本:
$Revision: 1.5 $
作者:
FracPete (fracpete at waikato dot ac dot nz)
另请参阅:
  • 构造器详细资料

    • XMLSerializationMethodHandler

      public XMLSerializationMethodHandler(Object owner) throws Exception
      initializes the method handling, executes also clear(), which adds initial methods automatically.
      参数:
      owner - the owner to retrieve the methods from
      抛出:
      Exception - if initialization fails
      另请参阅:
  • 方法详细资料

    • findReadMethod

      public static Method findReadMethod(Object o, String name)
      returns the method with the given name that has the same signature as readFromXML() of the XMLSerialiation class. simplifies the adding of custom methods.
      参数:
      o - the object to inspect
      name - the name of the method to return
      返回:
      either null if no method was found or a reference
      另请参阅:
    • findWriteMethod

      public static Method findWriteMethod(Object o, String name)
      returns the method with the given name that has the same signature as writeToXML() of the XMLSerialiation class. simplifies the adding of custom methods.
      参数:
      o - the object to inspect
      name - the name of the method to return
      返回:
      either null if no method was found or a reference
      另请参阅:
    • clear

      public void clear()
      removes all current methods and adds the methods according to the
    • read

      public MethodHandler read()
      returns the handler for read methods
      返回:
      the methodhandler for read methods
    • write

      public MethodHandler write()
      returns the handler for write methods
      返回:
      the methodhandler for read methods
    • register

      public void register(Object handler, Class cls, String name)
      adds read and write methods for the given class, i.e., read&;lt;name> and write<name> ("name" is prefixed by read and write)
      参数:
      handler - the handler class that contains the read and write method
      cls - the class to register the read and write method for
      name - the suffix of the read and write method
    • toString

      public String toString()
      returns the read and write method handlers as string
      覆盖:
      toString 在类中 Object
      返回:
      the read/write method handlers as string
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      返回:
      the revision