Home » iBatis-2.3.4 » com.ibatis.common » beans » [javadoc | source]

    1   /*
    2    *  Copyright 2004 Clinton Begin
    3    *
    4    *  Licensed under the Apache License, Version 2.0 (the "License");
    5    *  you may not use this file except in compliance with the License.
    6    *  You may obtain a copy of the License at
    7    *
    8    *      http://www.apache.org/licenses/LICENSE-2.0
    9    *
   10    *  Unless required by applicable law or agreed to in writing, software
   11    *  distributed under the License is distributed on an "AS IS" BASIS,
   12    *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   13    *  See the License for the specific language governing permissions and
   14    *  limitations under the License.
   15    */
   16   package com.ibatis.common.beans;
   17   
   18   /**
   19    * A Probe is an object that is used to work with beans, DOM objects, or other 
   20    * objects.
   21    */
   22   public interface Probe {
   23   
   24     /**
   25      * Gets an Object property from another object
   26      *
   27      * @param object - the object
   28      * @param name   - the property name
   29      * @return The property value (as an Object)
   30      */
   31     public Object getObject(Object object, String name);
   32   
   33     /**
   34      * Sets the value of a property on an object
   35      *
   36      * @param object - the object to change
   37      * @param name   - the name of the property to set
   38      * @param value  - the new value to set
   39      */
   40     public void setObject(Object object, String name, Object value);
   41   
   42     /**
   43      * Returns the class that the setter expects when setting a property
   44      *
   45      * @param object - the object to check
   46      * @param name   - the name of the property
   47      * @return The type of the property
   48      */
   49     public Class getPropertyTypeForSetter(Object object, String name);
   50   
   51     /**
   52      * Returns the class that the getter will return when reading a property
   53      *
   54      * @param object - the object to check
   55      * @param name   - the name of the property
   56      * @return The type of the property
   57      */
   58     public Class getPropertyTypeForGetter(Object object, String name);
   59   
   60     /**
   61      * Checks to see if an object has a writable property by a given name
   62      *
   63      * @param object       - the object to check
   64      * @param propertyName - the property to check for
   65      * @return True if the property exists and is writable
   66      */
   67     public boolean hasWritableProperty(Object object, String propertyName);
   68   
   69     /**
   70      * Checks to see if an object has a readable property by a given name
   71      *
   72      * @param object       - the object to check
   73      * @param propertyName - the property to check for
   74      * @return True if the property exists and is readable
   75      */
   76     public boolean hasReadableProperty(Object object, String propertyName);
   77   
   78   }

Home » iBatis-2.3.4 » com.ibatis.common » beans » [javadoc | source]