KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > aop > regression > jbaop110 > POJO


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.test.aop.regression.jbaop110;
23
24 import org.jboss.test.aop.regression.jbaop110.Type.NormalType;
25 import org.jboss.test.aop.regression.jbaop110.Type.StaticType;
26
27 /**
28  *
29  * @author <a HREF="kabir.khan@jboss.com">Kabir Khan</a>
30  * @version $Revision: 40295 $
31  */

32 public class POJO
33 {
34    NormalType nt;
35    StaticType st;
36
37    public POJO()
38    {
39       
40    }
41    
42    public POJO(NormalType ntype, StaticType stype)
43    {
44       
45    }
46    
47    public NormalType method(StaticType stype, NormalType ntype)
48    {
49       return ntype;
50    }
51    
52    public void executeNormal()
53    {
54       NormalClass instance = new NormalClass(Type.type.normalType, Type.type.staticType);
55       
56       instance.nnt = Type.type.normalType;
57       NormalType nt = instance.nnt;
58       
59       instance.nst = Type.type.staticType;
60       StaticType st = instance.nst;
61       
62       instance.method(Type.type.staticType, Type.type.normalType);
63    }
64    
65    public void executeStatic()
66    {
67       StaticClass instance = new StaticClass(Type.type.normalType, Type.type.staticType);
68       
69       instance.snt = Type.type.normalType;
70       NormalType nt = instance.snt;
71       
72       instance.sst = Type.type.staticType;
73       StaticType st = instance.sst;
74       
75       instance.method(Type.type.staticType, Type.type.normalType);
76    }
77    
78    public class NormalClass
79    {
80       NormalType nnt;
81       StaticType nst;
82       
83       public NormalClass(NormalType ntype, StaticType stype)
84       {
85          
86       }
87       
88       public NormalType method(StaticType stype, NormalType ntype)
89       {
90          return ntype;
91       }
92    }
93    
94    private static class StaticClass
95    {
96       Type.NormalType snt;
97       Type.StaticType sst;
98       
99       public StaticClass(NormalType ntype, StaticType stype)
100       {
101          
102       }
103       
104       public NormalType method(StaticType stype, NormalType ntype)
105       {
106          return ntype;
107       }
108    }
109
110 }
111
Popular Tags