commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmi...@apache.org
Subject cvs commit: jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri JXPathContextReferenceImpl.java
Date Sun, 20 Oct 2002 03:44:28 GMT
dmitri      2002/10/19 20:44:28

  Modified:    jxpath/src/java/org/apache/commons/jxpath/ri
                        JXPathContextReferenceImpl.java
  Log:
  Added support for DynaBeans
  
  Revision  Changes    Path
  1.23      +15 -4     jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
  
  Index: JXPathContextReferenceImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- JXPathContextReferenceImpl.java	13 Oct 2002 02:26:50 -0000	1.22
  +++ JXPathContextReferenceImpl.java	20 Oct 2002 03:44:27 -0000	1.23
  @@ -100,6 +100,7 @@
           nodeFactories.add(new BeanPointerFactory());
           nodeFactories.add(new DynamicPointerFactory());
   
  +        // DOM  factory is only registered if DOM support is on the classpath
           Object domFactory = allocateConditionally(
                   "org.apache.commons.jxpath.ri.model.dom.DOMPointerFactory",
                   "org.w3c.dom.Node");
  @@ -107,6 +108,7 @@
               nodeFactories.add(domFactory);
           }
   
  +        // JDOM  factory is only registered if JDOM is on the classpath
           Object jdomFactory = allocateConditionally(
                   "org.apache.commons.jxpath.ri.model.jdom.JDOMPointerFactory",
                   "org.jdom.Document");
  @@ -114,9 +116,18 @@
               nodeFactories.add(jdomFactory);
           }
   
  +        // DynaBean factory is only registered if BeanUtils are on the classpath
  +        Object dynaBeanFactory = allocateConditionally(
  +                "org.apache.commons.jxpath.ri.model.dynabeans.DynaBeanPointerFactory",
  +                "org.apache.commons.beanutils.DynaBean");
  +        if (dynaBeanFactory != null){
  +            nodeFactories.add(dynaBeanFactory);
  +        }
  +
           nodeFactories.add(new ContainerPointerFactory());
           createNodeFactoryArray();
       }
  +
       private NodePointer rootPointer;
   
       // The frequency of the cache cleanup
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message