velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: jakarta-velocity/src/java/org/apache/velocity/runtime RuntimeInstance.java RuntimeServices.java RuntimeSingleton.java
Date Sun, 09 Sep 2001 21:47:35 GMT
geirm       01/09/09 14:47:35

  Modified:    src/java/org/apache/velocity/runtime RuntimeInstance.java
                        RuntimeServices.java RuntimeSingleton.java
  Log:
  Final bit of change for seperable runtime instances, also brings
  introspection into the instance (as all other resources are...)
  
  Should be tab free.
  
  Revision  Changes    Path
  1.3       +21 -2     jakarta-velocity/src/java/org/apache/velocity/runtime/RuntimeInstance.java
  
  Index: RuntimeInstance.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/RuntimeInstance.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RuntimeInstance.java	2001/08/20 11:09:01	1.2
  +++ RuntimeInstance.java	2001/09/09 21:47:35	1.3
  @@ -91,6 +91,8 @@
   import org.apache.velocity.util.SimplePool;
   import org.apache.velocity.util.StringUtils;
   
  +import org.apache.velocity.util.introspection.Introspector;
  +
   import org.apache.velocity.exception.ResourceNotFoundException;
   import org.apache.velocity.exception.ParseErrorException;
   
  @@ -141,7 +143,7 @@
    * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
    * @author <a href="mailto:jlb@houseofdistraction.com">Jeff Bowden</a>
    * @author <a href="mailto:geirm@optonline.net">Geir Magusson Jr.</a>
  - * @version $Id: RuntimeInstance.java,v 1.2 2001/08/20 11:09:01 geirm Exp $
  + * @version $Id: RuntimeInstance.java,v 1.3 2001/09/09 21:47:35 geirm Exp $
    */
   public class RuntimeInstance implements RuntimeConstants, RuntimeServices
   {    
  @@ -212,15 +214,24 @@
   
       private ResourceManager resourceManager = null;
   
  +    /*
  +     *  Each runtime instance has it's own introspector
  +     *  to ensure that each instance is completely separate.
  +     */
  +    private Introspector introspector = null;
  +    
       public RuntimeInstance()
       {
           /*
  -         *  create a VM factory
  +         *  create a VM factory, resource manager
  +         *  and introspector
            */
   
           vmFactory = new VelocimacroFactory( this );
   
           resourceManager = new ResourceManager( this );
  +        
  +        introspector = new Introspector();
       }
   
       /*
  @@ -1016,4 +1027,12 @@
       {
           return configuration;
       }        
  +    
  +    /**
  +     *  Return the Introspector for this instance
  +     */
  +    public Introspector getIntrospector()
  +    {
  +        return introspector;
  +    }
   }
  
  
  
  1.2       +8 -1      jakarta-velocity/src/java/org/apache/velocity/runtime/RuntimeServices.java
  
  Index: RuntimeServices.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/RuntimeServices.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RuntimeServices.java	2001/08/07 22:03:00	1.1
  +++ RuntimeServices.java	2001/09/09 21:47:35	1.2
  @@ -91,6 +91,8 @@
   import org.apache.velocity.util.SimplePool;
   import org.apache.velocity.util.StringUtils;
   
  +import org.apache.velocity.util.introspection.Introspector;
  +
   import org.apache.velocity.exception.ResourceNotFoundException;
   import org.apache.velocity.exception.ParseErrorException;
   
  @@ -105,7 +107,7 @@
    *  Currently implemented by RuntimeInstance.
    * 
    * @author <a href="mailto:geirm@optonline.net">Geir Magusson Jr.</a>
  - * @version $Id: RuntimeServices.java,v 1.1 2001/08/07 22:03:00 geirm Exp $
  + * @version $Id: RuntimeServices.java,v 1.2 2001/09/09 21:47:35 geirm Exp $
    */
   public interface RuntimeServices
   {
  @@ -416,4 +418,9 @@
        */
       public ExtendedProperties getConfiguration();
   
  +    /*
  +     *  Return this instance's Introspector
  +     */
  +    public Introspector getIntrospector();
  +    
   }
  
  
  
  1.2       +13 -1     jakarta-velocity/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
  
  Index: RuntimeSingleton.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/RuntimeSingleton.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RuntimeSingleton.java	2001/08/07 22:00:21	1.1
  +++ RuntimeSingleton.java	2001/09/09 21:47:35	1.2
  @@ -96,6 +96,8 @@
   
   import org.apache.commons.collections.ExtendedProperties;
   
  +import org.apache.velocity.util.introspection.Introspector;
  +
   /**
    * This is the Runtime system for Velocity. It is the
    * single access point for all functionality in Velocity.
  @@ -141,7 +143,7 @@
    * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
    * @author <a href="mailto:jlb@houseofdistraction.com">Jeff Bowden</a>
    * @author <a href="mailto:geirm@optonline.net">Geir Magusson Jr.</a>
  - * @version $Id: RuntimeSingleton.java,v 1.1 2001/08/07 22:00:21 geirm Exp $
  + * @version $Id: RuntimeSingleton.java,v 1.2 2001/09/09 21:47:35 geirm Exp $
    */
   public class RuntimeSingleton implements RuntimeConstants
   {
  @@ -572,4 +574,14 @@
       {
           return ri.getConfiguration();
       }        
  +    
  +    /*
  +     *  Return the Introspector for this RuntimeInstance
  +     *
  +     *  @return Introspector object for this runtime instance
  +     */
  +    public static Introspector getIntrospector()
  +    {
  +        return ri.getIntrospector();
  +    }
   }
  
  
  

Mime
View raw message