donaldp     01/11/02 20:25:48

  Modified:    src/java/org/apache/avalon/cornerstone/blocks/dom
                        DOMImplementationFactory.java
  Log:
  Made class conform to Avalon standards.
  
  Revision  Changes    Path
  1.2       +50 -26    
jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/dom/DOMImplementationFactory.java
  
  Index: DOMImplementationFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/dom/DOMImplementationFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DOMImplementationFactory.java     2001/11/02 16:23:23     1.1
  +++ DOMImplementationFactory.java     2001/11/03 04:25:48     1.2
  @@ -5,55 +5,79 @@
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  -
   package org.apache.avalon.cornerstone.blocks.dom;
   
  -import org.apache.avalon.framework.logger.AbstractLoggable;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.logger.AbstractLoggable;
   import org.apache.avalon.phoenix.Block;
  +import org.w3c.dom.DOMException;
   import org.w3c.dom.DOMImplementation;
   import org.w3c.dom.Document;
   import org.w3c.dom.DocumentType;
  -import org.w3c.dom.DOMException;
  -
  -
  -public class DOMImplementationFactory extends AbstractLoggable implements 
Block, Configurable, DOMImplementation {
   
  -    protected DOMImplementation  mDOMImplementation;
  +public class DOMImplementationFactory 
  +    extends AbstractLoggable 
  +    implements Block, Configurable, DOMImplementation
  +{
  +    protected DOMImplementation m_domImplementation;
   
       public void dispose()
       {
  -        mDOMImplementation = null;
  +        m_domImplementation = null;
       }
   
  -    public void configure( Configuration configuration ) throws 
ConfigurationException {
  -        String domClass = 
configuration.getChild("domimplementation-class-name").getValue();
  -        try {
  -            mDOMImplementation = (DOMImplementation) 
Class.forName(domClass).newInstance();
  -        } catch (ClassNotFoundException cnfe) {
  -            throw new ConfigurationException("ClassNotFoundException for DOM 
implementaion factory",cnfe);
  -        } catch (InstantiationException ie) {
  -            throw new ConfigurationException("InstantiationException for DOM 
implementaion factory",ie);
  -        } catch (IllegalAccessException ie) {
  -            throw new ConfigurationException("IllegalAccessException for DOM 
implementaion factory",ie);
  +    public void configure( Configuration configuration ) 
  +        throws ConfigurationException 
  +    {
  +        final String domClass = 
  +            
configuration.getChild("domimplementation-class-name").getValue();
  +        try 
  +        {
  +            m_domImplementation = 
  +                (DOMImplementation)Class.forName(domClass).newInstance();
  +        } 
  +        catch( final ClassNotFoundException cnfe )
  +        {
  +            throw new ConfigurationException( "ClassNotFoundException for 
DOM " + 
  +                                              "implementaion factory",
  +                                              cnfe );
  +        } 
  +        catch( final InstantiationException ie )
  +        {
  +            throw new ConfigurationException( "InstantiationException for 
DOM " + 
  +                                              "implementaion factory", 
  +                                              ie );
  +        } 
  +        catch( final IllegalAccessException ie )
  +        {
  +            throw new ConfigurationException( "IllegalAccessException for 
DOM " + 
  +                                              "implementaion factory", 
  +                                              ie );
           }
  -
       }
   
       // Methods from DOMImplementaion interface.  We're acting as a proxy 
here.
  -
  -    public Document createDocument(String s, String s1, DocumentType type) 
throws DOMException {
  -        return mDOMImplementation.createDocument(s,s1,type);
  +    public Document createDocument( final String s, 
  +                                    final String s1, 
  +                                    final DocumentType type ) 
  +        throws DOMException
  +    {
  +        return m_domImplementation.createDocument( s, s1, type );
       }
   
  -    public DocumentType createDocumentType(String s, String s1, String s2) 
throws DOMException {
  -        return mDOMImplementation.createDocumentType(s,s1,s2);
  +    public DocumentType createDocumentType( final String s, 
  +                                            final String s1, 
  +                                            final String s2 ) 
  +        throws DOMException 
  +    {
  +        return m_domImplementation.createDocumentType( s, s1, s2 );
       }
   
  -    public boolean hasFeature(String s, String s1) {
  -        return mDOMImplementation.hasFeature(s,s1);
  +    public boolean hasFeature( final String s, final String s1 ) 
  +    {
  +        return m_domImplementation.hasFeature( s, s1 );
       }
   }
   
  
  
  

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

Reply via email to