程序包 weka.core.xml

类 MethodHandler

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

public class MethodHandler extends Object implements RevisionHandler
This class handles relationships between display names of properties (or classes) and Methods that are associated with them.
版本:
$Revision: 1.3 $
作者:
FracPete (fracpete at waikato dot ac dot nz)
  • 构造器概要

    构造器
    构造器
    说明
    initializes the handler
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    add(Class c, Method method)
    adds the specified method for the given class to its internal list.
    void
    add(String displayName, Method method)
    adds the specified method for the property with the given displayname to its internal list.
    void
    removes all mappings
    boolean
    checks whether a method is stored for the given class
    boolean
    contains(String displayName)
    checks whether a method is stored for the given property
    returns the stored method for the given class
    get(String displayName)
    returns the stored method for the given property
    Returns the revision string.
    returns an enumeration over all currently stored custom methods, i.e.
    boolean
    removes the method for the specified class from its internal list.
    boolean
    remove(String displayName)
    removes the method for the property specified by the display name from its internal list.
    int
    returns the number of currently stored Methods
    returns the internal Hashtable (propety/class - method relationship) in a string representation

    从类继承的方法 java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 构造器详细资料

    • MethodHandler

      public MethodHandler()
      initializes the handler
  • 方法详细资料

    • keys

      public Enumeration keys()
      returns an enumeration over all currently stored custom methods, i.e. it returns the display names/classes in the enumeration.
      返回:
      the currently stored methods
      另请参阅:
      • m_Methods
    • add

      public void add(String displayName, Method method)
      adds the specified method for the property with the given displayname to its internal list.
      参数:
      displayName - the display name of the property to handle manually
      method - the method, which will be invoked by reflection to handle the property manually
      另请参阅:
      • m_Methods
    • add

      public void add(Class c, Method method)
      adds the specified method for the given class to its internal list.
      参数:
      c - the class to handle manually
      method - the method, which will be invoked by reflection to handle the property manually
      另请参阅:
      • m_Methods
    • remove

      public boolean remove(String displayName)
      removes the method for the property specified by the display name from its internal list.
      参数:
      displayName - the display name of the propery to remove the custom method for
      返回:
      whether the method was stored in the list at all
      另请参阅:
      • m_Methods
    • remove

      public boolean remove(Class c)
      removes the method for the specified class from its internal list.
      参数:
      c - the class to remove the custom method for
      返回:
      whether the method was stored in the list at all
      另请参阅:
      • m_Methods
    • contains

      public boolean contains(String displayName)
      checks whether a method is stored for the given property
      参数:
      displayName - the display name of the property to check for a method
      返回:
      whether a method is currently stored
      另请参阅:
      • m_Methods
    • contains

      public boolean contains(Class c)
      checks whether a method is stored for the given class
      参数:
      c - the class to check for a method
      返回:
      whether a method is currently stored
      另请参阅:
      • m_Methods
    • get

      public Method get(String displayName)
      returns the stored method for the given property
      参数:
      displayName - the display name of the property to retrieve the method for
      返回:
      the method associated with the display name, can be null
      另请参阅:
      • m_Methods
    • get

      public Method get(Class c)
      returns the stored method for the given class
      参数:
      c - the class to retrieve the method for
      返回:
      the method associated with the class, can be null
      另请参阅:
      • m_Methods
    • size

      public int size()
      returns the number of currently stored Methods
      返回:
      the nummber of methods
    • clear

      public void clear()
      removes all mappings
    • toString

      public String toString()
      returns the internal Hashtable (propety/class - method relationship) in a string representation
      覆盖:
      toString 在类中 Object
      返回:
      the object as string
    • getRevision

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