avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/verifier SarVerifier.java
Date Tue, 04 Jun 2002 06:58:11 GMT
donaldp     2002/06/03 23:58:11

  Modified:    src/java/org/apache/avalon/phoenix/tools/assembler
                        Assembler.java
               src/java/org/apache/avalon/phoenix/components/application
                        BlockAccessor.java
               src/java/org/apache/avalon/phoenix/metadata
                        BlockMetaData.java
               src/java/org/apache/avalon/phoenix/tools/verifier
                        SarVerifier.java
  Log:
  No need for the nBlockMetaData to store the classname of block as it is already stored in
the BlockInfo
  
  Revision  Changes    Path
  1.17      +3 -2      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/assembler/Assembler.java
  
  Index: Assembler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/assembler/Assembler.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Assembler.java	20 May 2002 11:40:50 -0000	1.16
  +++ Assembler.java	4 Jun 2002 06:58:10 -0000	1.17
  @@ -30,7 +30,7 @@
    * and is in the format specified for <code>assembly.xml</code> files.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.16 $ $Date: 2002/05/20 11:40:50 $
  + * @version $Revision: 1.17 $ $Date: 2002/06/04 06:58:10 $
    */
   public class Assembler
       extends AbstractLogEnabled
  @@ -123,7 +123,8 @@
               final DependencyMetaData[] roles = buildDependencyMetaDatas( provides );
               final BlockInfo info = getBlockInfo( name, classname, classLoader );
   
  -            return new BlockMetaData( name, classname, roles, info );
  +
  +            return new BlockMetaData( name, roles, info );
           }
           catch( final ConfigurationException ce )
           {
  
  
  
  1.7       +3 -2      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/application/BlockAccessor.java
  
  Index: BlockAccessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/application/BlockAccessor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- BlockAccessor.java	4 Jun 2002 06:33:00 -0000	1.6
  +++ BlockAccessor.java	4 Jun 2002 06:58:11 -0000	1.7
  @@ -32,7 +32,7 @@
    * Block or Listener.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.6 $ $Date: 2002/06/04 06:33:00 $
  + * @version $Revision: 1.7 $ $Date: 2002/06/04 06:58:11 $
    */
   class BlockAccessor
       extends AbstractLogEnabled
  @@ -81,7 +81,8 @@
       {
           final BlockMetaData metaData = getMetaDataFor( entry );
           final ClassLoader classLoader = m_context.getClassLoader();
  -        final Class clazz = classLoader.loadClass( metaData.getClassname() );
  +        String classname = metaData.getBlockInfo().getBlockDescriptor().getClassname();
  +        final Class clazz = classLoader.loadClass( classname );
           return clazz.newInstance();
       }
   
  
  
  
  1.10      +1 -4      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/metadata/BlockMetaData.java
  
  Index: BlockMetaData.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/metadata/BlockMetaData.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BlockMetaData.java	11 Dec 2001 10:13:35 -0000	1.9
  +++ BlockMetaData.java	4 Jun 2002 06:58:11 -0000	1.10
  @@ -17,18 +17,15 @@
   public class BlockMetaData
   {
       private final String m_name;
  -    private final String m_classname;
       private final DependencyMetaData[] m_dependencies;
   
       private BlockInfo m_blockInfo;
   
       public BlockMetaData( final String name,
  -                          final String classname,
                             final DependencyMetaData[] dependencies,
                             final BlockInfo blockInfo )
       {
           m_name = name;
  -        m_classname = classname;
           m_dependencies = dependencies;
           m_blockInfo = blockInfo;
       }
  @@ -40,7 +37,7 @@
   
       public String getClassname()
       {
  -        return m_classname;
  +        return getBlockInfo().getBlockDescriptor().getClassname();
       }
   
       public BlockInfo getBlockInfo()
  
  
  
  1.20      +6 -5      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/verifier/SarVerifier.java
  
  Index: SarVerifier.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/verifier/SarVerifier.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- SarVerifier.java	4 Jun 2002 06:33:00 -0000	1.19
  +++ SarVerifier.java	4 Jun 2002 06:58:11 -0000	1.20
  @@ -59,7 +59,7 @@
    * </ul>
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.19 $ $Date: 2002/06/04 06:33:00 $
  + * @version $Revision: 1.20 $ $Date: 2002/06/04 06:58:11 $
    */
   public class SarVerifier
       extends AbstractLogEnabled
  @@ -360,16 +360,17 @@
           throws VerifyException
       {
           final String name = block.getName();
  +        final String classname = block.getClassname();
           Class clazz = null;
           try
           {
  -            clazz = classLoader.loadClass( block.getClassname() );
  +            clazz = classLoader.loadClass( classname );
           }
           catch( final Exception e )
           {
               final String message = REZ.getString( "bad-block-class",
                                                     name,
  -                                                  block.getClassname(),
  +                                                  classname,
                                                     e.getMessage() );
               throw new VerifyException( message );
           }
  @@ -387,7 +388,7 @@
               {
                   final String message = REZ.getString( "block-noimpl-service",
                                                         name,
  -                                                      block.getClassname(),
  +                                                      classname,
                                                         interfaces[ i ].getName() );
                   throw new VerifyException( message );
               }
  @@ -398,7 +399,7 @@
               final String message =
                   REZ.getString( "verifier.implements-block.error",
                                  name,
  -                               block.getClassname() );
  +                               classname );
               getLogger().error( message );
               System.err.println( message );
           }
  
  
  

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


Mime
View raw message