Class DomProbe

java.lang.Object
com.ibatis.common.beans.BaseProbe
com.ibatis.common.beans.DomProbe
All Implemented Interfaces:
Probe

public class DomProbe extends BaseProbe
A Probe implementation for working with DOM objects.
  • Constructor Details

    • DomProbe

      public DomProbe()
  • Method Details

    • getReadablePropertyNames

      public String[] getReadablePropertyNames(Object object)
      Description copied from class: BaseProbe
      Returns an array of the readable properties exposed by an object.
      Specified by:
      getReadablePropertyNames in class BaseProbe
      Parameters:
      object - - the object
      Returns:
      The array of property names
    • getWriteablePropertyNames

      public String[] getWriteablePropertyNames(Object object)
      Description copied from class: BaseProbe
      Returns an array of the writeable properties exposed by an object.
      Specified by:
      getWriteablePropertyNames in class BaseProbe
      Parameters:
      object - - the object
      Returns:
      The array of property names
    • getPropertyTypeForSetter

      public Class getPropertyTypeForSetter(Object object, String name)
      Description copied from interface: Probe
      Returns the class that the setter expects when setting a property.
      Parameters:
      object - - the object to check
      name - - the name of the property
      Returns:
      The type of the property
    • getPropertyTypeForGetter

      public Class getPropertyTypeForGetter(Object object, String name)
      Description copied from interface: Probe
      Returns the class that the getter will return when reading a property.
      Parameters:
      object - - the object to check
      name - - the name of the property
      Returns:
      The type of the property
    • hasWritableProperty

      public boolean hasWritableProperty(Object object, String propertyName)
      Description copied from interface: Probe
      Checks to see if an object has a writable property by a given name.
      Parameters:
      object - - the object to check
      propertyName - - the property to check for
      Returns:
      True if the property exists and is writable
    • hasReadableProperty

      public boolean hasReadableProperty(Object object, String propertyName)
      Description copied from interface: Probe
      Checks to see if an object has a readable property by a given name.
      Parameters:
      object - - the object to check
      propertyName - - the property to check for
      Returns:
      True if the property exists and is readable
    • getObject

      public Object getObject(Object object, String name)
      Description copied from interface: Probe
      Gets an Object property from another object.
      Parameters:
      object - - the object
      name - - the property name
      Returns:
      The property value (as an Object)
    • setObject

      public void setObject(Object object, String name, Object value)
      Description copied from interface: Probe
      Sets the value of a property on an object.
      Parameters:
      object - - the object to change
      name - - the name of the property to set
      value - - the new value to set
    • setProperty

      protected void setProperty(Object object, String property, Object value)
      Description copied from class: BaseProbe
      Sets the property.
      Specified by:
      setProperty in class BaseProbe
      Parameters:
      object - the object
      property - the property
      value - the value
    • getProperty

      protected Object getProperty(Object object, String property)
      Description copied from class: BaseProbe
      Gets the property.
      Specified by:
      getProperty in class BaseProbe
      Parameters:
      object - the object
      property - the property
      Returns:
      the property
    • nodeToString

      public static String nodeToString(Node node, String indent)
      Converts a DOM node to a complete xml string.
      Parameters:
      node - - the node to process
      indent - - how to indent the children of the node
      Returns:
      The node as a String