commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skitch...@apache.org
Subject cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester/plugins PluginManager.java
Date Wed, 07 Apr 2004 09:33:04 GMT
skitching    2004/04/07 02:33:04

  Modified:    digester/src/java/org/apache/commons/digester/plugins Tag:
                        DIGESTER_PLUGIN_REFACTORING_BRANCH
                        PluginManager.java
  Log:
  * remove PerDigesterResources param from constructor
  * change PerDigesterResources -> PluginContext
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.9.2.2   +17 -9     jakarta-commons/digester/src/java/org/apache/commons/digester/plugins/PluginManager.java
  
  Index: PluginManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/plugins/PluginManager.java,v
  retrieving revision 1.9.2.1
  retrieving revision 1.9.2.2
  diff -u -r1.9.2.1 -r1.9.2.2
  --- PluginManager.java	28 Mar 2004 06:12:29 -0000	1.9.2.1
  +++ PluginManager.java	7 Apr 2004 09:33:04 -0000	1.9.2.2
  @@ -47,20 +47,28 @@
        * The object containing data that should only exist once for each
        * Digester instance.
        */
  -    private PerDigesterResources perDigesterResources;
  +    private PluginContext pluginContext;
       
       //------------------- constructors ---------------------------------------
       
  -    /** Constructor. */
  -    public PluginManager(PerDigesterResources r) {
  -        perDigesterResources = r;
  +    /** Construct a "root" PluginManager, ie one with no parent. */
  +    public PluginManager(PluginContext r) {
  +        pluginContext = r;
       }
   
  -    /** Constructor. */
  -    public PluginManager(PerDigesterResources r, PluginManager parent) {
  +    /** 
  +     * Construct a "child" PluginManager. When declarations are added to
  +     * a "child", they are stored within the child and do not modify the
  +     * parent, so when the child goes out of scope, those declarations
  +     * disappear. When asking a "child" to retrieve a declaration, it 
  +     * delegates the search to its parent if it does not hold a matching
  +     * entry itself.
  +     * <p>
  +     * @param parent must be non-null.
  +     */
  +    public PluginManager(PluginManager parent) {
           this.parent = parent;
  -        this.perDigesterResources = r;
  -        // assert r == parent.perDigesterResources
  +        this.pluginContext = parent.pluginContext;
       }
       
       //------------------- methods --------------------------------------------
  @@ -144,7 +152,7 @@
           boolean debug = log.isDebugEnabled();
           log.debug("scanning ruleFinders to locate loader..");
           
  -        List ruleFinders = perDigesterResources.getRuleFinders();
  +        List ruleFinders = pluginContext.getRuleFinders();
           RuleLoader ruleLoader = null;
           try {
               for(Iterator i = ruleFinders.iterator(); 
  
  
  

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


Mime
View raw message