mvdb 2002/12/15 09:42:06
Modified: betwixt/src/java/org/apache/commons/betwixt
XMLIntrospector.java
betwixt/src/java/org/apache/commons/betwixt/registry
XMLBeanInfoRegistry.java NoCacheRegistry.java
Log:
Added flush to the registry interface and "reformatted" some stuff in xmlIntrospector
Revision Changes Path
1.13 +10 -16 jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/XMLIntrospector.java
Index: XMLIntrospector.java
===================================================================
RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/XMLIntrospector.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- XMLIntrospector.java 30 Nov 2002 17:16:37 -0000 1.12
+++ XMLIntrospector.java 15 Dec 2002 17:42:06 -0000 1.13
@@ -58,32 +58,27 @@
import java.beans.BeanDescriptor;
import java.beans.BeanInfo;
-import java.beans.Introspector;
import java.beans.IntrospectionException;
+import java.beans.Introspector;
import java.beans.PropertyDescriptor;
-import java.lang.reflect.Method;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import java.util.HashMap;
-
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
+import org.apache.commons.betwixt.digester.XMLBeanInfoDigester;
+import org.apache.commons.betwixt.digester.XMLIntrospectorHelper;
import org.apache.commons.betwixt.expression.EmptyExpression;
import org.apache.commons.betwixt.expression.IteratorExpression;
-import org.apache.commons.betwixt.expression.MethodExpression;
-import org.apache.commons.betwixt.expression.MethodUpdater;
import org.apache.commons.betwixt.expression.StringExpression;
-import org.apache.commons.betwixt.digester.XMLBeanInfoDigester;
-import org.apache.commons.betwixt.digester.XMLIntrospectorHelper;
+import org.apache.commons.betwixt.registry.DefaultXMLBeanInfoRegistry;
+import org.apache.commons.betwixt.registry.XMLBeanInfoRegistry;
import org.apache.commons.betwixt.strategy.DefaultNameMapper;
import org.apache.commons.betwixt.strategy.DefaultPluralStemmer;
import org.apache.commons.betwixt.strategy.NameMapper;
import org.apache.commons.betwixt.strategy.PluralStemmer;
-import org.apache.commons.betwixt.registry.XMLBeanInfoRegistry;
-import org.apache.commons.betwixt.registry.DefaultXMLBeanInfoRegistry;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* <p><code>XMLIntrospector</code> an introspector of beans to create
a
@@ -215,9 +210,8 @@
Introspector.setBeanInfoSearchPath(new String[] { });
}
- XMLBeanInfo xmlInfo = null;
- // see if info's in registry
- xmlInfo = registry.get( aClass );
+ XMLBeanInfo xmlInfo = registry.get( aClass );
+
if (xmlInfo == null) {
// lets see if we can find an XML descriptor first
if ( log.isDebugEnabled() ) {
1.2 +7 -1 jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/registry/XMLBeanInfoRegistry.java
Index: XMLBeanInfoRegistry.java
===================================================================
RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/registry/XMLBeanInfoRegistry.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XMLBeanInfoRegistry.java 27 Nov 2002 22:19:12 -0000 1.1
+++ XMLBeanInfoRegistry.java 15 Dec 2002 17:42:06 -0000 1.2
@@ -95,4 +95,10 @@
* Associate a class with it's <code>XMLBeanInfo</code>.
*/
public void put(Class forThisClass, XMLBeanInfo beanInfo);
+
+ /**
+ * Flush or resets the current registry to it's original state.
+ * It has to be implemented, however could be an empty implementation
+ */
+ public void flush();
}
1.2 +10 -1 jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/registry/NoCacheRegistry.java
Index: NoCacheRegistry.java
===================================================================
RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/registry/NoCacheRegistry.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NoCacheRegistry.java 27 Nov 2002 22:19:12 -0000 1.1
+++ NoCacheRegistry.java 15 Dec 2002 17:42:06 -0000 1.2
@@ -76,4 +76,13 @@
/** Do nothing */
public void put(Class forThisClass, XMLBeanInfo beanInfo) {}
+
+ /**
+ * @see org.apache.commons.betwixt.registry.XMLBeanInfoRegistry#flush()
+ *
+ */
+ public void flush()
+ {
+ }
+
}
--
To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
|