You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by dm...@apache.org on 2003/01/06 00:11:42 UTC
cvs commit: jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/standard StandardReflectedClazzTest.java StandardReflectedInstanceFactoryTest.java StandardReflectedListPropertyTest.java StandardReflectedOperationTest.java
dmitri 2003/01/05 15:11:41
Modified: clazz/src/java/org/apache/commons/clazz Clazz.java
clazz/src/java/org/apache/commons/clazz/reflect
ReflectedClazz.java
clazz/src/test/org/apache/commons/clazz/reflect
ReflectedClazzTestSupport.java
clazz/src/test/org/apache/commons/clazz/reflect/extended
ExtendedReflectedClazzTest.java
ExtendedReflectedInstanceFactoryTest.java
ExtendedReflectedListPropertyTest.java
ExtendedReflectedOperationTest.java
ReflectedMappedPropertyTest.java
clazz/src/test/org/apache/commons/clazz/reflect/standard
StandardReflectedClazzTest.java
StandardReflectedInstanceFactoryTest.java
StandardReflectedListPropertyTest.java
StandardReflectedOperationTest.java
Added: clazz/src/java/org/apache/commons/clazz
ClazzLoaderFactory.java
clazz/src/java/org/apache/commons/clazz/common
ExtendedClazzLoaderFactory.java
StandardClazzLoaderFactory.java
Log:
Introduced ClazzLoaderFactories
Revision Changes Path
1.6 +58 -101 jakarta-commons-sandbox/clazz/src/java/org/apache/commons/clazz/Clazz.java
Index: Clazz.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/java/org/apache/commons/clazz/Clazz.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Clazz.java 16 Dec 2002 23:17:41 -0000 1.5
+++ Clazz.java 5 Jan 2003 23:11:40 -0000 1.6
@@ -58,6 +58,7 @@
import org.apache.commons.clazz.bean.BeanClazzLoader;
import org.apache.commons.clazz.bean.BeanGroupClazzLoader;
+import org.apache.commons.clazz.common.*;
import org.apache.commons.clazz.common.CachingGroupClazzLoader;
import org.apache.commons.clazz.common.ClazzElementSupport;
import org.apache.commons.clazz.common.GroupClazzLoader;
@@ -78,143 +79,99 @@
private String name;
private List listeners;
- public static final String DEFAULT_CLAZZLOADER =
- "org.apache.commons.clazz.DefaultClazzLoader";
+ public static final String DEFAULT_CLAZZ_LOADER_FACTORY =
+ "org.apache.commons.clazz.DefaultClazzLoaderFactory";
- public static final String STANDARD_CLAZZLOADER =
- "org.apache.commons.clazz.StandardClazzLoader";
+ public static final String STANDARD_CLAZZ_LOADER_FACTORY =
+ "org.apache.commons.clazz.StandardClazzLoaderFactory";
- public static final String EXTENDED_CLAZZLOADER =
- "org.apache.commons.clazz.ExtendedClazzLoader";
+ public static final String EXTENDED_CLAZZ_LOADER_FACTORY =
+ "org.apache.commons.clazz.ExtendedClazzLoaderFactory";
private static ClazzLoader defaultClazzLoader;
- private static Map clazzLoaders = new HashMap();
+ private static Map clazzLoaderFactories = new HashMap();
static {
- setClazzLoader(STANDARD_CLAZZLOADER, buildStandardClazzLoader());
- ClazzLoader extended = buildExtendedClazzLoader();
- setClazzLoader(EXTENDED_CLAZZLOADER, extended);
-
- setClazzLoader(DEFAULT_CLAZZLOADER, extended);
- }
-
- /**
- * Construct the default clazz loader, that is the one based on the extended
- * notion of JavaBeans.
- */
- private static ClazzLoader buildExtendedClazzLoader(){
- GroupClazzLoader loader = new CachingGroupClazzLoader(null);
-
- // First build a general reflection-based ClazzLoader
- GroupClazzLoader reflectedGroup = new ReflectedGroupClazzLoader(loader);
-
- ClazzLoader reflectedLoader =
- new ExtendedReflectedClazzLoader(loader, getDefaultClassLoader());
+ setClazzLoaderFactory(
+ STANDARD_CLAZZ_LOADER_FACTORY,
+ StandardClazzLoaderFactory.FACTORY);
+
+ setClazzLoaderFactory(
+ EXTENDED_CLAZZ_LOADER_FACTORY,
+ ExtendedClazzLoaderFactory.FACTORY);
- reflectedGroup.addClazzLoader(reflectedLoader);
-
- loader.addClazzLoader(reflectedGroup);
-
-
- // Now build a dynamic clazz loader
-
- GroupClazzLoader beanGroup = new BeanGroupClazzLoader(loader);
-
- ClazzLoader beanLoader = new BeanClazzLoader(beanGroup);
-
- beanGroup.addClazzLoader(beanLoader);
-
- loader.addClazzLoader(beanGroup);
-
- return loader;
+ setClazzLoaderFactory(
+ DEFAULT_CLAZZ_LOADER_FACTORY,
+ ExtendedClazzLoaderFactory.FACTORY);
}
-
+
/**
- * Construct the standard clazz loader, that is the one that is based
- * strictly on the JavaBeans specification.
+ * Register a clazz loader factory for the specified key, which represents
+ * the type of model the corresponding clazz loaders implement.
+ *
+ * @param key is the type of the model
+ * @param clazzLoader
*/
- private static ClazzLoader buildStandardClazzLoader(){
- GroupClazzLoader loader = new CachingGroupClazzLoader(null);
-
- // First build a general reflection-based ClazzLoader
- GroupClazzLoader reflectedGroup = new ReflectedGroupClazzLoader(loader);
-
- ClazzLoader reflectedLoader =
- new StandardReflectedClazzLoader(loader, getDefaultClassLoader());
-
- reflectedGroup.addClazzLoader(reflectedLoader);
-
- loader.addClazzLoader(reflectedGroup);
-
-
- // Now build a dynamic clazz loader
-
- GroupClazzLoader beanGroup = new BeanGroupClazzLoader(loader);
-
- ClazzLoader beanLoader = new BeanClazzLoader(beanGroup);
-
- beanGroup.addClazzLoader(beanLoader);
-
- loader.addClazzLoader(beanGroup);
-
- return loader;
+ public static void setClazzLoaderFactory(
+ String key, ClazzLoaderFactory clazzLoaderFactory)
+ {
+ clazzLoaderFactories.put(key, clazzLoaderFactory);
}
-
+
/**
- * @todo this is a questionable method of acquiring "the" classloader for
- * the ClazzLoaders to work with.
+ * Register the default clazz loader factory.
*
- * @return ClassLoader
+ * @param clazzLoaderFactory
*/
- private static ClassLoader getDefaultClassLoader() {
- ClassLoader classLoader =
- Thread.currentThread().getContextClassLoader();
- if (classLoader == null) {
- classLoader = Clazz.class.getClassLoader();
- }
- return classLoader;
+ public static void setDefaultClazzLoaderFactory(
+ ClazzLoaderFactory clazzLoaderFactory)
+ {
+ clazzLoaderFactories.put(
+ DEFAULT_CLAZZ_LOADER_FACTORY,
+ clazzLoaderFactory);
}
/**
- * Sets the default ClazzLoader.
- * @param defaultClazzLoader The defaultClazzLoader to set
+ * Returns the default clazz loader factory.
*/
- public static void setDefaultClazzLoader(ClazzLoader defaultClazzLoader) {
- setClazzLoader(DEFAULT_CLAZZLOADER, defaultClazzLoader);
+ public static ClazzLoaderFactory getDefaultClazzLoaderFactory() {
+ return (ClazzLoaderFactory) clazzLoaderFactories.get(
+ DEFAULT_CLAZZ_LOADER_FACTORY);
}
/**
- * Register a clazz loader for the specified key, which represents the type
- * of model the clazz loader implements.
+ * Sets the default ClazzLoader.
*
- * @param key is the type of the model
- * @param clazzLoader
+ * @param defaultClazzLoader The defaultClazzLoader to set
*/
- public static void setClazzLoader(String key, ClazzLoader clazzLoader){
- clazzLoaders.put(key, clazzLoader);
- if (key.equals(DEFAULT_CLAZZLOADER)){
- defaultClazzLoader = clazzLoader;
- }
+ public static void setDefaultClazzLoader(ClazzLoader defaultClazzLoader) {
+ Clazz.defaultClazzLoader = defaultClazzLoader;
}
/**
* Returns the default ClazzLoader.
+ *
* @return ClazzLoader
*/
public static ClazzLoader getDefaultClazzLoader() {
+ if (defaultClazzLoader == null) {
+ defaultClazzLoader =
+ getDefaultClazzLoaderFactory().createClazzLoader(
+ Clazz.class.getClassLoader());
+ }
return defaultClazzLoader;
}
/**
- * Returns a ClazzLoader registered for the supplied key. We can have
- * multiple top- level clazz loaders implementing different models (e.g.
- * STANDARD_JAVA_BEANS, EXTENDED_JAVA_BEANS etc).
+ * Returns a ClazzLoaderFactory registered for the supplied key. We can have
+ * multiple clazz loader factories implementing different models (e.g.
+ * Standard JavaBeans, Extended JavaBeans etc).
*
* @param key is the type of the model we need
- * @return ClazzLoader
+ * @return ClazzLoaderFactory
*/
- public static ClazzLoader getClazzLoader(String key){
- return (ClazzLoader)clazzLoaders.get(key);
+ public static ClazzLoaderFactory getClazzLoaderFactory(String key){
+ return (ClazzLoaderFactory)clazzLoaderFactories.get(key);
}
/**
1.1 jakarta-commons-sandbox/clazz/src/java/org/apache/commons/clazz/ClazzLoaderFactory.java
Index: ClazzLoaderFactory.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.clazz;
/**
* A clazz loader factory creates and configures clazz loaders.
*
* @author <a href="mailto:dmitri@apache.org">Dmitri Plotnikov</a>
* @version $Id: ClazzLoaderFactory.java,v 1.1 2003/01/05 23:11:40 dmitri Exp $
*/
public interface ClazzLoaderFactory {
/**
* Allocate and configure a clazz loader that uses the supplied class loader
* for reflection.
*/
ClazzLoader createClazzLoader(ClassLoader contextClassLoader);
}
1.1 jakarta-commons-sandbox/clazz/src/java/org/apache/commons/clazz/common/ExtendedClazzLoaderFactory.java
Index: ExtendedClazzLoaderFactory.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.clazz.common;
import org.apache.commons.clazz.ClazzLoader;
import org.apache.commons.clazz.ClazzLoaderFactory;
import org.apache.commons.clazz.bean.BeanClazzLoader;
import org.apache.commons.clazz.bean.BeanGroupClazzLoader;
import org.apache.commons.clazz.reflect.ReflectedGroupClazzLoader;
import org.apache.commons.clazz.reflect.extended.ExtendedReflectedClazzLoader;
/**
*
* @author <a href="mailto:dmitri@apache.org">Dmitri Plotnikov</a>
* @version $Id: ExtendedClazzLoaderFactory.java,v 1.1 2003/01/05 23:11:40 dmitri Exp $
*/
public class ExtendedClazzLoaderFactory implements ClazzLoaderFactory {
public static final ClazzLoaderFactory FACTORY =
new ExtendedClazzLoaderFactory();
/**
* Constructor for ExtendedClazzLoaderFactory.
*/
protected ExtendedClazzLoaderFactory() {
}
/**
* @see org.apache.commons.clazz.ClazzLoaderFactory#createClazzLoader(java.lang.ClassLoader)
*/
public ClazzLoader createClazzLoader(ClassLoader contextClassLoader) {
GroupClazzLoader loader = new CachingGroupClazzLoader(null);
// First build a general reflection-based ClazzLoader
GroupClazzLoader reflectedGroup = new ReflectedGroupClazzLoader(loader);
ClazzLoader reflectedLoader =
new ExtendedReflectedClazzLoader(loader, contextClassLoader);
reflectedGroup.addClazzLoader(reflectedLoader);
loader.addClazzLoader(reflectedGroup);
// Now build a dynamic clazz loader
GroupClazzLoader beanGroup = new BeanGroupClazzLoader(loader);
ClazzLoader beanLoader = new BeanClazzLoader(beanGroup);
beanGroup.addClazzLoader(beanLoader);
loader.addClazzLoader(beanGroup);
return loader;
}
}
1.1 jakarta-commons-sandbox/clazz/src/java/org/apache/commons/clazz/common/StandardClazzLoaderFactory.java
Index: StandardClazzLoaderFactory.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.commons.clazz.common;
import org.apache.commons.clazz.ClazzLoader;
import org.apache.commons.clazz.ClazzLoaderFactory;
import org.apache.commons.clazz.bean.BeanClazzLoader;
import org.apache.commons.clazz.bean.BeanGroupClazzLoader;
import org.apache.commons.clazz.reflect.ReflectedGroupClazzLoader;
import org.apache.commons.clazz.reflect.standard.StandardReflectedClazzLoader;
/**
*
* @author <a href="mailto:dmitri@apache.org">Dmitri Plotnikov</a>
* @version $Id: StandardClazzLoaderFactory.java,v 1.1 2003/01/05 23:11:40 dmitri Exp $
*/
public class StandardClazzLoaderFactory implements ClazzLoaderFactory {
public static final ClazzLoaderFactory FACTORY =
new StandardClazzLoaderFactory();
/**
* Constructor for StandardClazzLoaderFactory.
*/
protected StandardClazzLoaderFactory() {
}
/**
* @see org.apache.commons.clazz.ClazzLoaderFactory#createClazzLoader(java.lang.ClassLoader)
*/
public ClazzLoader createClazzLoader(ClassLoader contextClassLoader) {
GroupClazzLoader loader = new CachingGroupClazzLoader(null);
// First build a general reflection-based ClazzLoader
GroupClazzLoader reflectedGroup = new ReflectedGroupClazzLoader(loader);
ClazzLoader reflectedLoader =
new StandardReflectedClazzLoader(loader, contextClassLoader);
reflectedGroup.addClazzLoader(reflectedLoader);
loader.addClazzLoader(reflectedGroup);
// Now build a dynamic clazz loader
GroupClazzLoader beanGroup = new BeanGroupClazzLoader(loader);
ClazzLoader beanLoader = new BeanClazzLoader(beanGroup);
beanGroup.addClazzLoader(beanLoader);
loader.addClazzLoader(beanGroup);
return loader;
}
}
1.4 +1 -3 jakarta-commons-sandbox/clazz/src/java/org/apache/commons/clazz/reflect/ReflectedClazz.java
Index: ReflectedClazz.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/java/org/apache/commons/clazz/reflect/ReflectedClazz.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ReflectedClazz.java 14 Dec 2002 02:38:41 -0000 1.3
+++ ReflectedClazz.java 5 Jan 2003 23:11:40 -0000 1.4
@@ -389,8 +389,6 @@
}
}
- operationList.addAll(operationMap.values());
-
// if (isLoggingEnabled()) {
// logPropertyParseResults();
// }
1.4 +9 -2 jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/ReflectedClazzTestSupport.java
Index: ReflectedClazzTestSupport.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/ReflectedClazzTestSupport.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ReflectedClazzTestSupport.java 14 Dec 2002 02:38:43 -0000 1.3
+++ ReflectedClazzTestSupport.java 5 Jan 2003 23:11:40 -0000 1.4
@@ -82,12 +82,19 @@
super(name);
}
+ protected abstract String getModelKey();
+
/**
* Override to test out different Clazz models.
*
* @return ClazzLoader
*/
- protected abstract ClazzLoader getClazzLoader();
+ protected ClazzLoader getClazzLoader(){
+ return Clazz
+ .getClazzLoaderFactory(getModelKey())
+ .createClazzLoader(getClass().getClassLoader());
+
+ }
/**
1.3 +3 -3 jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/extended/ExtendedReflectedClazzTest.java
Index: ExtendedReflectedClazzTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/extended/ExtendedReflectedClazzTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ExtendedReflectedClazzTest.java 14 Dec 2002 02:38:43 -0000 1.2
+++ ExtendedReflectedClazzTest.java 5 Jan 2003 23:11:40 -0000 1.3
@@ -89,8 +89,8 @@
return suite;
}
- protected ClazzLoader getClazzLoader(){
- return Clazz.getClazzLoader(Clazz.DEFAULT_CLAZZLOADER);
+ protected String getModelKey(){
+ return Clazz.EXTENDED_CLAZZ_LOADER_FACTORY;
}
public void testGetSuperClazz() {
1.2 +4 -6 jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/extended/ExtendedReflectedInstanceFactoryTest.java
Index: ExtendedReflectedInstanceFactoryTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/extended/ExtendedReflectedInstanceFactoryTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ExtendedReflectedInstanceFactoryTest.java 14 Dec 2002 02:38:43 -0000 1.1
+++ ExtendedReflectedInstanceFactoryTest.java 5 Jan 2003 23:11:40 -0000 1.2
@@ -72,10 +72,8 @@
super(name);
}
- /**
- * @see org.apache.commons.clazz.reflect.ReflectedClazzTestSupport#getClazzLoader()
- */
- protected ClazzLoader getClazzLoader() {
- return Clazz.getClazzLoader(Clazz.DEFAULT_CLAZZLOADER);
+ protected String getModelKey(){
+ return Clazz.EXTENDED_CLAZZ_LOADER_FACTORY;
}
+
}
1.3 +4 -4 jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/extended/ExtendedReflectedListPropertyTest.java
Index: ExtendedReflectedListPropertyTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/extended/ExtendedReflectedListPropertyTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ExtendedReflectedListPropertyTest.java 14 Dec 2002 02:38:43 -0000 1.2
+++ ExtendedReflectedListPropertyTest.java 5 Jan 2003 23:11:40 -0000 1.3
@@ -86,10 +86,10 @@
return new TestSuite(ExtendedReflectedListPropertyTest.class);
}
- protected ClazzLoader getClazzLoader(){
- return Clazz.getClazzLoader(Clazz.DEFAULT_CLAZZLOADER);
+ protected String getModelKey(){
+ return Clazz.EXTENDED_CLAZZ_LOADER_FACTORY;
}
-
+
/**
* Checks the set of methods recognized for a List property that
* does not have regular get/set methods.
1.2 +4 -6 jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/extended/ExtendedReflectedOperationTest.java
Index: ExtendedReflectedOperationTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/extended/ExtendedReflectedOperationTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ExtendedReflectedOperationTest.java 14 Dec 2002 02:38:43 -0000 1.1
+++ ExtendedReflectedOperationTest.java 5 Jan 2003 23:11:40 -0000 1.2
@@ -72,10 +72,8 @@
super(name);
}
- /**
- * @see org.apache.commons.clazz.reflect.ReflectedClazzTestSupport#getClazzLoader()
- */
- protected ClazzLoader getClazzLoader() {
- return Clazz.getClazzLoader(Clazz.DEFAULT_CLAZZLOADER);
+ protected String getModelKey(){
+ return Clazz.EXTENDED_CLAZZ_LOADER_FACTORY;
}
+
}
1.3 +4 -3 jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/extended/ReflectedMappedPropertyTest.java
Index: ReflectedMappedPropertyTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/extended/ReflectedMappedPropertyTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ReflectedMappedPropertyTest.java 14 Dec 2002 02:38:43 -0000 1.2
+++ ReflectedMappedPropertyTest.java 5 Jan 2003 23:11:40 -0000 1.3
@@ -102,9 +102,10 @@
(ReflectedMappedProperty)clazz.getProperty("mappedBooleans");
}
- protected ClazzLoader getClazzLoader(){
- return Clazz.getClazzLoader(Clazz.DEFAULT_CLAZZLOADER);
+ protected String getModelKey(){
+ return Clazz.EXTENDED_CLAZZ_LOADER_FACTORY;
}
+
/**
* Checks the full set of methods recognized for a mapped property.
1.3 +4 -4 jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/standard/StandardReflectedClazzTest.java
Index: StandardReflectedClazzTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/standard/StandardReflectedClazzTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- StandardReflectedClazzTest.java 14 Dec 2002 02:38:43 -0000 1.2
+++ StandardReflectedClazzTest.java 5 Jan 2003 23:11:41 -0000 1.3
@@ -88,10 +88,10 @@
return suite;
}
- protected ClazzLoader getClazzLoader(){
- return Clazz.getClazzLoader(Clazz.STANDARD_CLAZZLOADER);
+ protected String getModelKey(){
+ return Clazz.STANDARD_CLAZZ_LOADER_FACTORY;
}
-
+
public void testGetSuperClazz() {
assertEquals(
ReflectableInstance.class.getSuperclass().getName(),
1.2 +4 -6 jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/standard/StandardReflectedInstanceFactoryTest.java
Index: StandardReflectedInstanceFactoryTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/standard/StandardReflectedInstanceFactoryTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StandardReflectedInstanceFactoryTest.java 14 Dec 2002 02:38:43 -0000 1.1
+++ StandardReflectedInstanceFactoryTest.java 5 Jan 2003 23:11:41 -0000 1.2
@@ -72,10 +72,8 @@
super(name);
}
- /**
- * @see org.apache.commons.clazz.reflect.ReflectedClazzTestSupport#getClazzLoader()
- */
- protected ClazzLoader getClazzLoader() {
- return Clazz.getClazzLoader(Clazz.STANDARD_CLAZZLOADER);
+ protected String getModelKey(){
+ return Clazz.STANDARD_CLAZZ_LOADER_FACTORY;
}
+
}
1.3 +4 -3 jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/standard/StandardReflectedListPropertyTest.java
Index: StandardReflectedListPropertyTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/standard/StandardReflectedListPropertyTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- StandardReflectedListPropertyTest.java 14 Dec 2002 02:38:43 -0000 1.2
+++ StandardReflectedListPropertyTest.java 5 Jan 2003 23:11:41 -0000 1.3
@@ -85,9 +85,10 @@
return new TestSuite(StandardReflectedListPropertyTest.class);
}
- protected ClazzLoader getClazzLoader(){
- return Clazz.getClazzLoader(Clazz.STANDARD_CLAZZLOADER);
+ protected String getModelKey(){
+ return Clazz.STANDARD_CLAZZ_LOADER_FACTORY;
}
+
/**
* Checks the set of methods recognized for a List property that
1.2 +4 -6 jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/standard/StandardReflectedOperationTest.java
Index: StandardReflectedOperationTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/clazz/src/test/org/apache/commons/clazz/reflect/standard/StandardReflectedOperationTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StandardReflectedOperationTest.java 14 Dec 2002 02:38:43 -0000 1.1
+++ StandardReflectedOperationTest.java 5 Jan 2003 23:11:41 -0000 1.2
@@ -72,10 +72,8 @@
super(name);
}
- /**
- * @see org.apache.commons.clazz.reflect.ReflectedClazzTestSupport#getClazzLoader()
- */
- protected ClazzLoader getClazzLoader() {
- return Clazz.getClazzLoader(Clazz.STANDARD_CLAZZLOADER);
+ protected String getModelKey(){
+ return Clazz.STANDARD_CLAZZ_LOADER_FACTORY;
}
+
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>