avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vin...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/classretrievers DynamicGeneratorClassRetriever.java
Date Fri, 17 May 2002 19:02:19 GMT
vinayc      02/05/17 12:02:19

  Modified:    altrmi/src/java/org/apache/excalibur/altrmi/server/impl/classretrievers
                        DynamicGeneratorClassRetriever.java
  Log:
  BCEL generator can also be used to dynamically generate proxies
  
  Revision  Changes    Path
  1.3       +19 -4     jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/classretrievers/DynamicGeneratorClassRetriever.java
  
  Index: DynamicGeneratorClassRetriever.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/classretrievers/DynamicGeneratorClassRetriever.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DynamicGeneratorClassRetriever.java	24 Apr 2002 12:43:02 -0000	1.2
  +++ DynamicGeneratorClassRetriever.java	17 May 2002 19:02:19 -0000	1.3
  @@ -26,7 +26,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public class DynamicGeneratorClassRetriever implements AltrmiProxyGenerator, ClassRetriever
   {
  @@ -35,9 +35,10 @@
       private String mClassGenDir;
       private String mSrcGenDir;
       private URL mGenJarURL;
  +	private String mGeneratorClass="org.apache.excalibur.altrmi.generator.ProxyGeneratorImpl";
   
       /**
  -     * Constructor JarFileClassRetriever
  +     * Constructor DynamicGeneratorClassRetriever
        *
        *
        */
  @@ -46,6 +47,20 @@
           mGenJarURL = genJarURL;
       }
   
  +	/**
  +     * Constructor DynamicGeneratorClassRetriever
  +     * @param genJarURL 
  +	 * @param generatorType  Values: "bcel" - Use the BCELProxyGeneratorImpl for generating
the proxies
  +	 *	                                      Any other value for generatorType uses the default
generator,v.i.z
  +	 *                                        ProxyGeneratorImpl (which internally uses 'javac'
to generate proxies)
  +     *
  +     */
  +    public DynamicGeneratorClassRetriever( URL genJarURL ,String generatorType)
  +    {
  +        mGenJarURL = genJarURL;
  +		if(generatorType.equalsIgnoreCase("bcel"))
  +			mGeneratorClass="org.apache.excalibur.altrmi.generator.BCELProxyGeneratorImpl";
  +    }
       /**
        * Method generate
        *
  @@ -251,7 +266,7 @@
           {
               proxyGenerator =
                   (ProxyGenerator)tmpGenClassLoader
  -                .loadClass( "org.apache.excalibur.altrmi.generator.ProxyGeneratorImpl"
)
  +                .loadClass( mGeneratorClass)
                   .newInstance();
           }
           catch( Exception e )
  @@ -355,7 +370,7 @@
           {
               proxyGenerator =
                   (ProxyGenerator)tmpGenClassLoader
  -                .loadClass( "org.apache.excalibur.altrmi.generator.ProxyGeneratorImpl"
)
  +                .loadClass( mGeneratorClass )
                   .newInstance();
           }
           catch( Exception e )
  
  
  

--
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