KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ch > ethz > inf > iks > jvmai > jvmdi > CodeSignatureImpl


1 //
2
// This file is part of the prose package.
3
//
4
// The contents of this file are subject to the Mozilla Public License
5
// Version 1.1 (the "License"); you may not use this file except in
6
// compliance with the License. You may obtain a copy of the License at// http://www.mozilla.org/MPL/
7
//
8
// Software distributed under the License is distributed on an "AS IS" basis,
9
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10
// for the specific language governing rights and limitations under the
11
// License.
12
//
13
// The Original Code is prose.
14
//
15
// The Initial Developer of the Original Code is Andrei Popovici. Portions
16
// created by Andrei Popovici are Copyright (C) 2002 Andrei Popovici.
17
// All Rights Reserved.
18
//
19
// Contributor(s):
20
//
21
// $Id: CodeSignatureImpl.java,v 1.1.1.1 2003/07/02 15:30:50 apopovic Exp $
22
// =====================================================================
23
//
24
// (history at end)
25
//
26
package ch.ethz.inf.iks.jvmai.jvmdi;
27
28
29 import java.lang.String JavaDoc;
30 import java.lang.Class JavaDoc;
31 import ch.ethz.jvmai.Signature;
32 /**
33  * MethodSignature defines ...
34  *
35  * @version $Revision: 1.1.1.1 $
36  * @author popovici
37  */

38 public class CodeSignatureImpl implements Signature
39 {
40    private CodeJoinPointImpl owner;
41
42     protected CodeSignatureImpl(CodeJoinPointImpl owner)
43     {
44     this.owner = owner;
45     }
46
47    public Class JavaDoc getDeclaringType()
48     {
49     return owner.getMethod().getDeclaringClass();
50     }
51
52     public int getModifiers()
53     {
54       return owner.getMethod().getModifiers();
55     }
56
57     public String JavaDoc getName()
58     {
59     return owner.getMethod().getName();
60     }
61
62     public String JavaDoc toLongString()
63     {
64     return owner.getMethod().toString();
65     }
66
67     public String JavaDoc toShortString()
68     {
69     return owner.getMethod().toString();
70     }
71
72     public String JavaDoc toString()
73     {
74     return toShortString();
75     }
76
77     public Class JavaDoc[] getParameterTypes()
78     {
79     return owner.getMethod().getParameterTypes();
80     }
81
82     public Class JavaDoc[] getExceptionTypes()
83     {
84     return owner.getMethod().getExceptionTypes();
85     }
86
87     public String JavaDoc[] getParameterNames()
88     {
89       return owner.context.getParameterNames();
90     }
91
92     public Class JavaDoc getReturnType()
93     {
94     return owner.getMethod().getReturnType();
95     }
96 }
97
Popular Tags