Author: cbegin Date: Tue Jun 23 05:09:27 2009 New Revision: 787545 URL: http://svn.apache.org/viewvc?rev=787545&view=rev Log: renamed some classes in reflection package and reorganized them
Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/factory/ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/factory/DefaultObjectFactory.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/DefaultObjectFactory.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/factory/ObjectFactory.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/ObjectFactory.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/GetFieldInvoker.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/GetFieldInvoker.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/Invoker.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/Invoker.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/MethodInvoker.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MethodInvoker.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/SetFieldInvoker.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/SetFieldInvoker.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/property/ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/property/PropertyNamer.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/PropertyNamer.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/property/PropertyTokenizer.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/PropertyTokenizer.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/BaseWrapper.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/BaseDynamicObject.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/BeanWrapper.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/BeanDynamicObject.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/HybridWrapper.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/HybridDynamicObject.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/MapWrapper.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MapDynamicObject.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/ObjectWrapper.java - copied, changed from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/DynamicObject.java Removed: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/BaseDynamicObject.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/BeanDynamicObject.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/DefaultObjectFactory.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/DynamicObject.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/GetFieldInvoker.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/HybridDynamicObject.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/Invoker.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MapDynamicObject.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MethodInvoker.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/ObjectFactory.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/PropertyNamer.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/PropertyTokenizer.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/SetFieldInvoker.java Modified: ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/main/java/com/ibatis/sqlmap/engine/builder/XmlSqlMapConfigParser.java ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryImpl.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/builder/xml/XMLConfigBuilder.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/loader/ResultObjectProxy.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/statement/BaseStatementHandler.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MetaClass.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MetaObject.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/Reflector.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/builder/ExampleObjectFactory.java Modified: ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/main/java/com/ibatis/sqlmap/engine/builder/XmlSqlMapConfigParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/main/java/com/ibatis/sqlmap/engine/builder/XmlSqlMapConfigParser.java?rev=787545&r1=787544&r2=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/main/java/com/ibatis/sqlmap/engine/builder/XmlSqlMapConfigParser.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/main/java/com/ibatis/sqlmap/engine/builder/XmlSqlMapConfigParser.java Tue Jun 23 05:09:27 2009 @@ -9,7 +9,7 @@ import org.apache.ibatis.io.Resources; import org.apache.ibatis.mapping.ExecutorType; import org.apache.ibatis.reflection.MetaClass; -import org.apache.ibatis.reflection.ObjectFactory; +import org.apache.ibatis.reflection.factory.ObjectFactory; import org.apache.ibatis.type.JdbcType; import org.apache.ibatis.type.TypeHandler; import org.apache.ibatis.parsing.XNode; Modified: ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryImpl.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryImpl.java?rev=787545&r1=787544&r2=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryImpl.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/test/java/com/ibatis/sqlmap/ResultObjectFactoryImpl.java Tue Jun 23 05:09:27 2009 @@ -1,6 +1,6 @@ package com.ibatis.sqlmap; -import org.apache.ibatis.reflection.ObjectFactory; +import org.apache.ibatis.reflection.factory.ObjectFactory; import testdomain.*; import java.util.List; Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/builder/xml/XMLConfigBuilder.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/builder/xml/XMLConfigBuilder.java?rev=787545&r1=787544&r2=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/builder/xml/XMLConfigBuilder.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/builder/xml/XMLConfigBuilder.java Tue Jun 23 05:09:27 2009 @@ -8,6 +8,7 @@ import org.apache.ibatis.parsing.*; import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.reflection.*; +import org.apache.ibatis.reflection.factory.ObjectFactory; import org.apache.ibatis.transaction.TransactionFactory; import org.apache.ibatis.type.TypeHandler; Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/loader/ResultObjectProxy.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/loader/ResultObjectProxy.java?rev=787545&r1=787544&r2=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/loader/ResultObjectProxy.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/loader/ResultObjectProxy.java Tue Jun 23 05:09:27 2009 @@ -2,7 +2,7 @@ import net.sf.cglib.proxy.*; import org.apache.ibatis.reflection.*; -import org.apache.ibatis.mapping.Configuration; +import org.apache.ibatis.reflection.property.PropertyNamer; import org.apache.ibatis.type.TypeHandlerRegistry; import java.io.Serializable; Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java?rev=787545&r1=787544&r2=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java Tue Jun 23 05:09:27 2009 @@ -7,6 +7,7 @@ import org.apache.ibatis.executor.result.*; import org.apache.ibatis.mapping.*; import org.apache.ibatis.reflection.*; +import org.apache.ibatis.reflection.factory.ObjectFactory; import org.apache.ibatis.type.*; import java.sql.*; Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/statement/BaseStatementHandler.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/statement/BaseStatementHandler.java?rev=787545&r1=787544&r2=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/statement/BaseStatementHandler.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/statement/BaseStatementHandler.java Tue Jun 23 05:09:27 2009 @@ -5,7 +5,7 @@ import org.apache.ibatis.executor.result.ResultHandler; import org.apache.ibatis.executor.resultset.ResultSetHandler; import org.apache.ibatis.mapping.*; -import org.apache.ibatis.reflection.ObjectFactory; +import org.apache.ibatis.reflection.factory.ObjectFactory; import org.apache.ibatis.type.TypeHandlerRegistry; import java.sql.*; Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java?rev=787545&r1=787544&r2=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java Tue Jun 23 05:09:27 2009 @@ -14,7 +14,8 @@ import org.apache.ibatis.executor.resultset.*; import org.apache.ibatis.executor.statement.*; import org.apache.ibatis.plugin.*; -import org.apache.ibatis.reflection.*; +import org.apache.ibatis.reflection.factory.ObjectFactory; +import org.apache.ibatis.reflection.factory.DefaultObjectFactory; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.transaction.Transaction; import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory; Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MetaClass.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MetaClass.java?rev=787545&r1=787544&r2=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MetaClass.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MetaClass.java Tue Jun 23 05:09:27 2009 @@ -1,5 +1,8 @@ package org.apache.ibatis.reflection; +import org.apache.ibatis.reflection.invoker.Invoker; +import org.apache.ibatis.reflection.property.PropertyTokenizer; + public class MetaClass { private Reflector reflector; Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MetaObject.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MetaObject.java?rev=787545&r1=787544&r2=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MetaObject.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MetaObject.java Tue Jun 23 05:09:27 2009 @@ -1,23 +1,30 @@ package org.apache.ibatis.reflection; +import org.apache.ibatis.reflection.wrapper.BeanWrapper; +import org.apache.ibatis.reflection.wrapper.MapWrapper; +import org.apache.ibatis.reflection.wrapper.ObjectWrapper; +import org.apache.ibatis.reflection.property.PropertyTokenizer; +import org.apache.ibatis.reflection.factory.ObjectFactory; +import org.apache.ibatis.reflection.factory.DefaultObjectFactory; + import java.util.Map; public class MetaObject { private static final ObjectFactory DEFAULT_OBJECT_FACTORY = new DefaultObjectFactory(); - protected static final MetaObject NULL_META_OBJECT = new MetaObject(NullObject.class, DEFAULT_OBJECT_FACTORY); + public static final MetaObject NULL_META_OBJECT = new MetaObject(NullObject.class, DEFAULT_OBJECT_FACTORY); - private DynamicObject dynamicObject; + private ObjectWrapper dynamicObject; private ObjectFactory objectFactory; private MetaObject(Object object, ObjectFactory objectFactory) { this.objectFactory = objectFactory; - if (object instanceof DynamicObject) { - this.dynamicObject = (DynamicObject) object; + if (object instanceof ObjectWrapper) { + this.dynamicObject = (ObjectWrapper) object; } else if (object instanceof Map) { - this.dynamicObject = new MapDynamicObject(this, (Map)object); + this.dynamicObject = new MapWrapper(this, (Map)object); } else { - this.dynamicObject = new BeanDynamicObject(this, object); + this.dynamicObject = new BeanWrapper(this, object); } } @@ -104,7 +111,7 @@ return MetaObject.forObject(value); } - public DynamicObject getDynamicObject() { + public ObjectWrapper getDynamicObject() { return dynamicObject; } Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/Reflector.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/Reflector.java?rev=787545&r1=787544&r2=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/Reflector.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/Reflector.java Tue Jun 23 05:09:27 2009 @@ -1,5 +1,11 @@ package org.apache.ibatis.reflection; +import org.apache.ibatis.reflection.invoker.Invoker; +import org.apache.ibatis.reflection.invoker.GetFieldInvoker; +import org.apache.ibatis.reflection.invoker.SetFieldInvoker; +import org.apache.ibatis.reflection.invoker.MethodInvoker; +import org.apache.ibatis.reflection.property.PropertyNamer; + import java.lang.reflect.*; import java.util.*; @@ -7,7 +13,7 @@ * This class represents a cached set of class definition information that * allows for easy mapping between property names and getter/setter methods. */ -class Reflector { +public class Reflector { private static boolean classCacheEnabled = true; private static final String[] EMPTY_STRING_ARRAY = new String[0]; Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/factory/DefaultObjectFactory.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/DefaultObjectFactory.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/factory/DefaultObjectFactory.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/factory/DefaultObjectFactory.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/DefaultObjectFactory.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/DefaultObjectFactory.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/factory/DefaultObjectFactory.java Tue Jun 23 05:09:27 2009 @@ -1,4 +1,6 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.factory; + +import org.apache.ibatis.reflection.ReflectionException; import java.lang.reflect.Constructor; import java.util.*; Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/factory/ObjectFactory.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/ObjectFactory.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/factory/ObjectFactory.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/factory/ObjectFactory.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/ObjectFactory.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/ObjectFactory.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/factory/ObjectFactory.java Tue Jun 23 05:09:27 2009 @@ -1,4 +1,4 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.factory; import java.util.*; Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/GetFieldInvoker.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/GetFieldInvoker.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/GetFieldInvoker.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/GetFieldInvoker.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/GetFieldInvoker.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/GetFieldInvoker.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/GetFieldInvoker.java Tue Jun 23 05:09:27 2009 @@ -1,8 +1,8 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.invoker; import java.lang.reflect.*; -class GetFieldInvoker implements Invoker { +public class GetFieldInvoker implements Invoker { private Field field; public GetFieldInvoker(Field field) { Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/Invoker.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/Invoker.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/Invoker.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/Invoker.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/Invoker.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/Invoker.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/Invoker.java Tue Jun 23 05:09:27 2009 @@ -1,8 +1,8 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.invoker; import java.lang.reflect.InvocationTargetException; -interface Invoker { +public interface Invoker { Object invoke(Object target, Object[] args) throws IllegalAccessException, InvocationTargetException; Class getType(); Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/MethodInvoker.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MethodInvoker.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/MethodInvoker.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/MethodInvoker.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MethodInvoker.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MethodInvoker.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/MethodInvoker.java Tue Jun 23 05:09:27 2009 @@ -1,8 +1,8 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.invoker; import java.lang.reflect.*; -class MethodInvoker implements Invoker { +public class MethodInvoker implements Invoker { private Class type; private Method method; Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/SetFieldInvoker.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/SetFieldInvoker.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/SetFieldInvoker.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/SetFieldInvoker.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/SetFieldInvoker.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/SetFieldInvoker.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/invoker/SetFieldInvoker.java Tue Jun 23 05:09:27 2009 @@ -1,8 +1,8 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.invoker; import java.lang.reflect.*; -class SetFieldInvoker implements Invoker { +public class SetFieldInvoker implements Invoker { private Field field; public SetFieldInvoker(Field field) { Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/property/PropertyNamer.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/PropertyNamer.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/property/PropertyNamer.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/property/PropertyNamer.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/PropertyNamer.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/PropertyNamer.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/property/PropertyNamer.java Tue Jun 23 05:09:27 2009 @@ -1,4 +1,6 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.property; + +import org.apache.ibatis.reflection.ReflectionException; import java.util.Locale; Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/property/PropertyTokenizer.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/PropertyTokenizer.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/property/PropertyTokenizer.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/property/PropertyTokenizer.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/PropertyTokenizer.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/PropertyTokenizer.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/property/PropertyTokenizer.java Tue Jun 23 05:09:27 2009 @@ -1,4 +1,4 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.property; import java.util.Iterator; Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/BaseWrapper.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/BaseDynamicObject.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/BaseWrapper.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/BaseWrapper.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/BaseDynamicObject.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/BaseDynamicObject.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/BaseWrapper.java Tue Jun 23 05:09:27 2009 @@ -1,13 +1,17 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.wrapper; + +import org.apache.ibatis.reflection.MetaObject; +import org.apache.ibatis.reflection.property.PropertyTokenizer; +import org.apache.ibatis.reflection.ReflectionException; import java.util.*; -abstract class BaseDynamicObject implements DynamicObject { +public abstract class BaseWrapper implements ObjectWrapper { protected static final Object[] NO_ARGUMENTS = new Object[0]; protected MetaObject metaObject; - protected BaseDynamicObject(MetaObject metaObject) { + protected BaseWrapper(MetaObject metaObject) { this.metaObject = metaObject; } Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/BeanWrapper.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/BeanDynamicObject.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/BeanWrapper.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/BeanWrapper.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/BeanDynamicObject.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/BeanDynamicObject.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/BeanWrapper.java Tue Jun 23 05:09:27 2009 @@ -1,11 +1,15 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.wrapper; -class BeanDynamicObject extends BaseDynamicObject { +import org.apache.ibatis.reflection.*; +import org.apache.ibatis.reflection.property.PropertyTokenizer; +import org.apache.ibatis.reflection.invoker.Invoker; + +public class BeanWrapper extends BaseWrapper { private Object object; private MetaClass metaClass; - public BeanDynamicObject(MetaObject metaObject, Object object) { + public BeanWrapper(MetaObject metaObject, Object object) { super(metaObject); this.object = object; this.metaClass = MetaClass.forClass(object.getClass()); Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/HybridWrapper.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/HybridDynamicObject.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/HybridWrapper.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/HybridWrapper.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/HybridDynamicObject.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/HybridDynamicObject.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/HybridWrapper.java Tue Jun 23 05:09:27 2009 @@ -1,15 +1,18 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.wrapper; + +import org.apache.ibatis.reflection.MetaObject; +import org.apache.ibatis.reflection.property.PropertyTokenizer; import java.util.*; -public class HybridDynamicObject implements DynamicObject { +public class HybridWrapper implements ObjectWrapper { private Object object; private HashMap dynamicProperties; - private DynamicObject dynamicMap; - private DynamicObject dynamicBean; + private ObjectWrapper dynamicMap; + private ObjectWrapper dynamicBean; - public HybridDynamicObject(Object object) { + public HybridWrapper(Object object) { this.object = object; this.dynamicBean = MetaObject.forObject(object).getDynamicObject(); this.dynamicProperties = new HashMap(); Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/MapWrapper.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MapDynamicObject.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/MapWrapper.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/MapWrapper.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MapDynamicObject.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/MapDynamicObject.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/MapWrapper.java Tue Jun 23 05:09:27 2009 @@ -1,12 +1,15 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.wrapper; + +import org.apache.ibatis.reflection.MetaObject; +import org.apache.ibatis.reflection.property.PropertyTokenizer; import java.util.Map; -class MapDynamicObject extends BaseDynamicObject { +public class MapWrapper extends BaseWrapper { private Map map; - public MapDynamicObject(MetaObject metaObject, Map map) { + public MapWrapper(MetaObject metaObject, Map map) { super(metaObject); this.map = map; } Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/ObjectWrapper.java (from r787523, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/DynamicObject.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/ObjectWrapper.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/ObjectWrapper.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/DynamicObject.java&r1=787523&r2=787545&rev=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/DynamicObject.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/reflection/wrapper/ObjectWrapper.java Tue Jun 23 05:09:27 2009 @@ -1,6 +1,8 @@ -package org.apache.ibatis.reflection; +package org.apache.ibatis.reflection.wrapper; -public interface DynamicObject { +import org.apache.ibatis.reflection.property.PropertyTokenizer; + +public interface ObjectWrapper { Object get(PropertyTokenizer prop); Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/builder/ExampleObjectFactory.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/builder/ExampleObjectFactory.java?rev=787545&r1=787544&r2=787545&view=diff ============================================================================== --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/builder/ExampleObjectFactory.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/builder/ExampleObjectFactory.java Tue Jun 23 05:09:27 2009 @@ -1,6 +1,6 @@ package org.apache.ibatis.builder; -import org.apache.ibatis.reflection.DefaultObjectFactory; +import org.apache.ibatis.reflection.factory.DefaultObjectFactory; import java.util.*;