avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon-excalibur/fortress/src/tools/org/apache/avalon/fortress/tools ComponentMetaInfoCollector.java
Date Thu, 10 Apr 2003 16:53:22 GMT
bloritsch    2003/04/10 09:53:22

  Modified:    fortress/src/test/org/apache/avalon/fortress/test/data
                        Component1.java Component2.java Component3.java
                        Component4.java Role1.java Role2.java
               fortress/src/tools/org/apache/avalon/fortress/tools
                        ComponentMetaInfoCollector.java
  Log:
  update the tool to be closer to the latest discussions on avalon tags
  
  Revision  Changes    Path
  1.6       +3 -2      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Component1.java
  
  Index: Component1.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Component1.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Component1.java	7 Apr 2003 21:38:27 -0000	1.5
  +++ Component1.java	10 Apr 2003 16:53:21 -0000	1.6
  @@ -51,8 +51,9 @@
   
   /**
    * @avalon.component
  + * @avalon.service type=Role1
    * @x-avalon.lifecycle singleton
  - * @x-avalon.name component1
  + * @x-avalon.info name=component1
    *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
    * @version $Revision$ $Date$
  
  
  
  1.6       +3 -2      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Component2.java
  
  Index: Component2.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Component2.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Component2.java	7 Apr 2003 21:38:27 -0000	1.5
  +++ Component2.java	10 Apr 2003 16:53:21 -0000	1.6
  @@ -51,8 +51,9 @@
   
   /**
    * @avalon.component
  + * @avalon.service type=org.apache.avalon.fortress.test.data.Role2
    * @x-avalon.lifecycle pooled
  - * @x-avalon.name component2
  + * @x-avalon.info name=component2
    *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
    * @version $Revision$ $Date$
  
  
  
  1.6       +2 -2      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Component3.java
  
  Index: Component3.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Component3.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Component3.java	7 Apr 2003 21:38:27 -0000	1.5
  +++ Component3.java	10 Apr 2003 16:53:22 -0000	1.6
  @@ -52,7 +52,7 @@
   /**
    * @avalon.component
    * @x-avalon.lifecycle thread
  - * @x-avalon.name component3
  + * @x-avalon.info name=component3
    *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
    * @version $Revision$ $Date$
  
  
  
  1.6       +2 -2      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Component4.java
  
  Index: Component4.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Component4.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Component4.java	7 Apr 2003 21:38:27 -0000	1.5
  +++ Component4.java	10 Apr 2003 16:53:22 -0000	1.6
  @@ -52,7 +52,7 @@
   /**
    * @avalon.component
    * @x-avalon.lifecycle transient
  - * @x-avalon.name component4
  + * @x-avalon.info name=component4
    *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
    * @version $Revision$ $Date$
  
  
  
  1.6       +1 -3      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Role1.java
  
  Index: Role1.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Role1.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Role1.java	7 Apr 2003 21:38:27 -0000	1.5
  +++ Role1.java	10 Apr 2003 16:53:22 -0000	1.6
  @@ -50,8 +50,6 @@
   package org.apache.avalon.fortress.test.data;
   
   /**
  - * @avalon.role
  - *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
    * @version $Revision$ $Date$
    */
  
  
  
  1.6       +1 -3      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Role2.java
  
  Index: Role2.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/data/Role2.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Role2.java	7 Apr 2003 21:38:27 -0000	1.5
  +++ Role2.java	10 Apr 2003 16:53:22 -0000	1.6
  @@ -50,8 +50,6 @@
   package org.apache.avalon.fortress.test.data;
   
   /**
  - * @avalon.role
  - *
    * @author <a href="mailto:peter at apache.org">Peter Donald</a>
    * @version $Revision$ $Date$
    */
  
  
  
  1.9       +18 -3     avalon-excalibur/fortress/src/tools/org/apache/avalon/fortress/tools/ComponentMetaInfoCollector.java
  
  Index: ComponentMetaInfoCollector.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/tools/org/apache/avalon/fortress/tools/ComponentMetaInfoCollector.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ComponentMetaInfoCollector.java	8 Apr 2003 01:06:54 -0000	1.8
  +++ ComponentMetaInfoCollector.java	10 Apr 2003 16:53:22 -0000	1.9
  @@ -212,9 +212,24 @@
                   tag = javaClass.getTagByName( "avalon.service" );
                   if( null != tag )
                   {
  -                    String className = tag.getValue().trim();
  +                    String className = tag.getNamedParameter("type").trim();
                       if (className != null || className.length() > 0)
                       {
  +                        if ( className.indexOf('.') < 0)
  +                        {
  +                            int classLen = className.length();
  +                            Type[] types = javaClass.getImplements();
  +                            for (int t = 0; t < types.length; t++)
  +                            {
  +                                String type = types[t].getValue();
  +                                int typeLen = type.length();
  +                                if (type.substring(typeLen - classLen).equals(className))
  +                                {
  +                                    className = type;
  +                                }
  +                            }
  +                        }
  +
                           m_services.add( className );
                       }
                   }
  @@ -279,10 +294,10 @@
           if ( null != lifecycle ) meta.setProperty("x-avalon.lifecycle", lifecycle);
           if ( null != handler ) meta.setProperty("fortress.handler", handler);
           
  -        DocletTag avalonConfigName = javaClass.getTagByName("x-avalon.name");
  +        DocletTag avalonConfigName = javaClass.getTagByName("x-avalon.info");
           if ( null == avalonConfigName ) avalonConfigName = javaClass.getTagByName("fortress.name");
   
  -        meta.setProperty("x-avalon.name", (avalonConfigName == null) ? ServiceRoleManager.createShortName(javaClass.getName())
: avalonConfigName.getValue() );
  +        meta.setProperty("x-avalon.name", (avalonConfigName == null) ? ServiceRoleManager.createShortName(javaClass.getName())
: avalonConfigName.getNamedParameter("name") );
       }
   
       /**
  
  
  

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


Mime
View raw message