KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > enhancer > interceptors > lifecycle > LifeCycleInterceptorsClassesEnhancer


1 /**
2  * EasyBeans
3  * Copyright (C) 2006 Bull S.A.S.
4  * Contact: easybeans@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: LifeCycleInterceptorsClassesEnhancer.java 444 2006-05-10 16:24:20Z benoitf $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.easybeans.tests.enhancer.interceptors.lifecycle;
27
28 import java.util.ArrayList JavaDoc;
29 import java.util.List JavaDoc;
30
31 import org.objectweb.easybeans.tests.common.enhancer.ClassesEnhancer;
32
33
34 /**
35  * Checks that interceptor enhancing of classses is ok.
36  * @author Florent Benoit
37  */

38 public final class LifeCycleInterceptorsClassesEnhancer {
39
40     /**
41      * Utility class, no constructor.
42      */

43     private LifeCycleInterceptorsClassesEnhancer() {
44
45     }
46
47     /**
48      * Enhance the classes simulating a Bean.
49      * @throws Exception if it fails
50      */

51     public static void enhance() throws Exception JavaDoc {
52         String JavaDoc packageName = "org.objectweb.easybeans.tests.enhancer.interceptors.lifecycle.bean.".replace(".", "/");
53         String JavaDoc suffixClass = ".class";
54
55         List JavaDoc<String JavaDoc> list = new ArrayList JavaDoc<String JavaDoc>();
56         list.add(packageName + "MyLifeCycleInterceptorStateful" + suffixClass);
57         list.add(packageName + "MyLifeCycleInterceptorStateless" + suffixClass);
58         list.add(packageName + "SessionBeanItf" + suffixClass);
59         list.add(packageName + "AbsSessionBean" + suffixClass);
60         list.add(packageName + "StatefulBean" + suffixClass);
61         list.add(packageName + "StatelessBean" + suffixClass);
62         list.add(packageName + "StatelessBean2" + suffixClass);
63         list.add(packageName + "StatelessBean3" + suffixClass);
64
65         ClassesEnhancer.enhance(list, ClassesEnhancer.TYPE.INTERCEPTOR);
66     }
67
68 }
69
Popular Tags