KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > cglib > proxy > Source


1 /*
2  * Copyright 2002,2003 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package net.sf.cglib.proxy;
17
18 public abstract class Source implements java.io.Serializable JavaDoc{
19     
20     public static class CheckedException extends Exception JavaDoc{}
21     public static class UndeclaredException extends Exception JavaDoc{}
22
23  public String JavaDoc toString(){
24    return "";
25  }
26     public Source() {
27     }
28     
29     public void callAll(){
30      protectedMethod();
31      packageMethod();
32      abstractMethod();
33      synchronizedMethod();
34      finalMethod();
35      intType(1);
36      longType(1L);
37      floatType(1f);
38      doubleType(1.0);
39      objectType("1") ;
40      voidType();
41      multiArg(1,1,1,1,"","","");
42     }
43     
44     protected void protectedMethod(){}
45     
46     void packageMethod(){}
47     
48     abstract void abstractMethod();
49     
50     public void throwChecked()throws CheckedException{
51       throw new CheckedException();
52     }
53     
54      
55     
56      public void throwIndexOutOfBoundsException(){
57        throw new IndexOutOfBoundsException JavaDoc();
58     }
59
60      public void throwAbstractMethodError(){
61        throw new AbstractMethodError JavaDoc();
62     }
63  
64     
65     public synchronized void synchronizedMethod(){}
66     
67     public final void finalMethod(){ }
68     
69     public int intType(int val){
70       return val;
71     }
72     public long longType(long val){
73       return val;
74     }
75     public double doubleType(double val){
76       return val;
77     }
78     public float floatType(float val){
79       return val;
80     }
81     
82     public boolean booleanType(boolean val){
83       return val;
84     }
85     
86     public short shortType(short val){
87       return val;
88     }
89     
90     public char charType(char val){
91       return val;
92     }
93     
94     public byte byteType(byte val){
95       return val;
96     }
97     
98     public int [] arrayType(int val[]){
99       return val;
100     }
101     
102     public String JavaDoc [] arrayType(String JavaDoc val[]){
103       return val;
104     }
105     
106     
107     
108     public Object JavaDoc objectType(Object JavaDoc val){
109       return val;
110     }
111     public void voidType(){
112     
113     }
114     public void multiArg( int arg1, long arg2,
115                            double arg3, float arg4, Object JavaDoc arg5, Object JavaDoc arg6, Object JavaDoc arg7 ){
116     
117     }
118     
119 }
120
Popular Tags