avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/kernel/impl DefaultKernel.java
Date Thu, 06 Mar 2003 09:15:50 GMT
mcconnell    2003/03/06 01:15:50

  Modified:    merlin/src/java/org/apache/avalon/merlin/kernel/impl
                        DefaultKernel.java
  Log:
  Modified toString to provide some useful output (temporary).
  
  Revision  Changes    Path
  1.14      +23 -4     avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernel.java
  
  Index: DefaultKernel.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernel.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DefaultKernel.java	27 Feb 2003 23:47:35 -0000	1.13
  +++ DefaultKernel.java	6 Mar 2003 09:15:50 -0000	1.14
  @@ -269,9 +269,14 @@
       *     <td>The working home directory.</td> 
       *   </tr>
       *   <tr>
  +    *     <td><code>urn:merlin:system</code></td>
  +    *     <td>{@link java.io.File}</td>
  +    *     <td>The Merlin system home directory.</td> 
  +    *   </tr>
  +    *   <tr>
       *     <td><code>urn:merlin:classloader.common</code></td>
       *     <td>{@link java.lang.ClassLoader}</td>
  -    *     <td>The shared classloader.</td> 
  +    *     <td>The shared classloader.</td>
       *   </tr>
       *   <tr>
       *     <td><code>urn:merlin:classloader.system</code></td>
  @@ -690,8 +695,22 @@
       */
       public String toString()
       {
  -        return "DefaultKernel"
  -          + ":" + System.identityHashCode( this );
  +        StringBuffer buffer = new StringBuffer( "DefaultKernel: " + System.identityHashCode(
this ) );
  +        try
  +        {
  +            // list the block URLs
  +            URL[] urls = m_block.getURLs();
  +            for( int i=0; i<urls.length; i++ )
  +            {
  +                buffer.append( "\n  " + urls[i].toString() );
  +            }
  +            buffer.append( "\n" );
  +            return buffer.toString();
  +        }
  +        catch( Throwable e )
  +        {
  +            return "DefaultKernel: " + System.identityHashCode( this );
  +        }
       }
   
      /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message