01: //
02: // This file is part of the prose package.
03: //
04: // The contents of this file are subject to the Mozilla Public License
05: // Version 1.1 (the "License"); you may not use this file except in
06: // compliance with the License. You may obtain a copy of the License at// http://www.mozilla.org/MPL/
07: //
08: // Software distributed under the License is distributed on an "AS IS" basis,
09: // 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: import java.lang.String;
29: import java.lang.Class;
30: import ch.ethz.jvmai.Signature;
31:
32: /**
33: * CodeSignatureImpl class.
34: *
35: * @version $Revision: 1.1.1.1 $
36: * @author popovici
37: */
38: public class CodeSignatureImpl implements Signature {
39: private CodeJoinPointImpl owner;
40:
41: protected CodeSignatureImpl(CodeJoinPointImpl owner) {
42: this .owner = owner;
43: }
44:
45: public Class getDeclaringType() {
46: return owner.getMethod().getDeclaringClass();
47: }
48:
49: public int getModifiers() {
50: return owner.getMethod().getModifiers();
51: }
52:
53: public String getName() {
54: return owner.getMethod().getName();
55: }
56:
57: public String toLongString() {
58: return owner.getMethod().toString();
59: }
60:
61: public String toShortString() {
62: return owner.getMethod().toString();
63: }
64:
65: public String toString() {
66: return toShortString();
67: }
68:
69: public Class[] getParameterTypes() {
70: return owner.getMethod().getParameterTypes();
71: }
72:
73: public Class[] getExceptionTypes() {
74: return owner.getMethod().getExceptionTypes();
75: }
76:
77: public String[] getParameterNames() {
78: return owner.context.getParameterNames();
79: }
80:
81: public Class getReturnType() {
82: return owner.getMethod().getReturnType();
83: }
84: }
|