skitching    2004/04/07 02:35:33

  Modified:    digester/src/java/org/apache/commons/digester/plugins Tag:
                        DIGESTER_PLUGIN_REFACTORING_BRANCH RuleFinder.java
                        RuleLoader.java
  Log:
  Now abstract classes instead of interfaces for future compatibility,
  as per suggestion from Robert Donkin.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.2   +10 -4     
jakarta-commons/digester/src/java/org/apache/commons/digester/plugins/Attic/RuleFinder.java
  
  Index: RuleFinder.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/plugins/Attic/RuleFinder.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- RuleFinder.java   28 Mar 2004 05:38:47 -0000      1.1.2.1
  +++ RuleFinder.java   7 Apr 2004 09:35:32 -0000       1.1.2.2
  @@ -29,10 +29,15 @@
    * Instances of this class can also be regarded as a Factory for RuleLoaders,
    * except that an instance of a RuleLoader is only created if the particular
    * finder algorithm can locate a suitable source of rules given the plugin
  - * class and associated properties. 
  + * class and associated properties.
  + * <p>
  + * This is an abstract class rather than an interface in order to make
  + * it possible to enhance this class in future without breaking binary
  + * compatibility; it is possible to add methods to an abstract class, but
  + * not to an interface. 
    */
   
  -public interface RuleFinder {
  +public abstract class RuleFinder {
   
       /**
        * Apply the finder algorithm to attempt to locate a source of
  @@ -60,7 +65,8 @@
        * of rules, but there is something invalid about that source.
        */
   
  -     public RuleLoader findLoader(Digester d, Class pluginClass, Properties p)
  -                            throws PluginException;
  +     public abstract RuleLoader findLoader(
  +                        Digester d, Class pluginClass, 
  +                        Properties p) throws PluginException;
   }
   
  
  
  
  1.1.2.2   +7 -2      
jakarta-commons/digester/src/java/org/apache/commons/digester/plugins/Attic/RuleLoader.java
  
  Index: RuleLoader.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/plugins/Attic/RuleLoader.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- RuleLoader.java   28 Mar 2004 05:38:47 -0000      1.1.2.1
  +++ RuleLoader.java   7 Apr 2004 09:35:32 -0000       1.1.2.2
  @@ -25,9 +25,14 @@
    * Each plugin declaration has an associated RuleLoader instance, and that
    * instance's addRules method is invoked each time the input xml specifies
    * that an instance of that plugged-in class is to be created.
  + * <p>
  + * This is an abstract class rather than an interface in order to make
  + * it possible to enhance this class in future without breaking binary
  + * compatibility; it is possible to add methods to an abstract class, but
  + * not to an interface. 
    */
   
  -public interface RuleLoader {
  +public abstract class RuleLoader {
       
       /**
        * Configures the digester with custom rules for some plugged-in
  @@ -37,5 +42,5 @@
        * which maps to a PluginCreateRule. Any rules added here are removed
        * from the digester when the end of that xml tag is encountered.
        */
  -    public void addRules(Digester d, String path) throws PluginException;
  +    public abstract void addRules(Digester d, String path) throws PluginException;
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to