KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > aop > reflection > ReflectionTester


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.reflection;
23
24 import org.jboss.test.aop.AOPTestWithSetup;
25
26 import junit.framework.Test;
27 import junit.framework.TestSuite;
28
29 /**
30  * @author <a HREF="mailto:kabir.khan@jboss.org">Kabir Khan</a>
31  * @version $Revision: 45977 $
32  */

33 public class ReflectionTester extends AOPTestWithSetup
34 {
35    ReflectionPOJO reflectionPOJO;
36    public static Test suite()
37    {
38       TestSuite suite = new TestSuite("ReflectionTester");
39       suite.addTestSuite(ReflectionTester.class);
40       return suite;
41    }
42    // Constants ----------------------------------------------------
43
// Attributes ---------------------------------------------------
44

45    // Static -------------------------------------------------------
46

47    // Constructors -------------------------------------------------
48
public ReflectionTester(String JavaDoc name)
49    {
50       super(name);
51    }
52
53    // Public -------------------------------------------------------
54

55    public void testAccessFromConstructor()
56    {
57       System.out.println("RUNNING TEST ACCESS FROM CONSTRUCTOR");
58       ReflectionPOJO reflectionPOJO = new ReflectionPOJO(1);
59       System.out.println("pojo=" + reflectionPOJO);
60    }
61    
62    public void testAccessFromMethod()
63    {
64       System.out.println("RUNNING TEST ACCESS FROM METHOD");
65       ReflectionPOJO reflectionPOJO = new ReflectionPOJO();
66       reflectionPOJO.testCreationAndFieldAccess();
67    }
68    
69    public void testCleanGetMethods()
70    {
71       System.out.println("RUNNING TEST CLEAN GET METHODS");
72       ReflectionPOJO reflectionPOJO = new ReflectionPOJO();
73       reflectionPOJO.testCleanGetMethods();
74    }
75    
76    public void testCleanGetDeclaredMethods()
77    {
78       System.out.println("RUNNING TEST CLEAN GET DECLARED METHODS");
79       ReflectionPOJO reflectionPOJO = new ReflectionPOJO();
80       reflectionPOJO.testCleanGetDeclaredMethods();
81    }
82    
83    public void testCleanGetDeclaredFields()
84    {
85       System.out.println("RUNNING TEST CLEAN GET DECLARED FIELDS");
86       ReflectionPOJO reflectionPOJO = new ReflectionPOJO();
87       reflectionPOJO.testCleanGetDeclaredFields();
88    }
89    
90    public void testCleanGetInterfaces()
91    {
92       System.out.println("RUNNING TEST CLEAN GET INTERFACES");
93       ReflectionPOJO reflectionPOJO = new ReflectionPOJO();
94       reflectionPOJO.testCleanGetInterfaces();
95    }
96    
97    public void testCleanGetDeclaredMethod()
98    {
99       System.out.println("RUNNING TEST CLEAN GET DECLARED METHOD");
100       ReflectionPOJO reflectionPOJO = new ReflectionPOJO();
101       reflectionPOJO.testCleanGetDeclaredMethod();
102    }
103    
104    public void testCleanGetDeclaredField()
105    {
106       System.out.println("RUNNING TEST CLEAN GET DECLARED FIELD");
107       ReflectionPOJO reflectionPOJO = new ReflectionPOJO();
108       reflectionPOJO.testCleanGetDeclaredField();
109    }
110    
111    public void testCleanGetMethod()
112    {
113       System.out.println("RUNNING TEST CLEAN GET METHOD");
114       ReflectionPOJO reflectionPOJO = new ReflectionPOJO();
115       reflectionPOJO.testCleanGetMethod();
116    }
117    
118    public void testCleanGetClasses()
119    {
120       System.out.println("RUNNING TEST CLEAN GET CLASSES");
121       ReflectionPOJO reflectionPOJO = new ReflectionPOJO();
122       reflectionPOJO.testCleanGetClasses();
123    }
124    
125    public void testCleanGetDeclaredClasses()
126    {
127       System.out.println("RUNNING TEST CLEAN GET DECLARED CLASSES");
128       ReflectionPOJO reflectionPOJO = new ReflectionPOJO();
129       reflectionPOJO.testCleanGetDeclaredClasses();
130    }
131    
132
133    // Inner classes -------------------------------------------------
134
}
135
136
Popular Tags