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
07: // http://www.mozilla.org/MPL/
08: //
09: // Software distributed under the License is distributed on an "AS IS" basis,
10: // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11: // for the specific language governing rights and limitations under the
12: // License.
13: //
14: // The Original Code is prose.
15: //
16: // The Initial Developer of the Original Code is Andrei Popovici. Portions
17: // created by Andrei Popovici are Copyright (C) 2002 Andrei Popovici.
18: // All Rights Reserved.
19: //
20: // Contributor(s):
21: //
22: // $Id: FieldSignatureImpl.java,v 1.1.1.1 2003/07/02 15:30:50 apopovic Exp $
23: // =====================================================================
24: //
25: // (history at end)
26: //
27: package ch.ethz.inf.iks.jvmai.jvmdi;
28:
29: import ch.ethz.jvmai.FieldSignature;
30: import ch.ethz.jvmai.FieldJoinPoint;
31:
32: /**
33: * FieldSignatureImpl class.
34: *
35: * @version $Revision: 1.1.1.1 $
36: * @author popovici
37: */
38: public class FieldSignatureImpl implements FieldSignature {
39: protected FieldJoinPoint fieldOwner;
40:
41: public FieldSignatureImpl(FieldJoinPointImpl x) {
42: fieldOwner = x;
43: }
44:
45: public String getName() {
46: return fieldOwner.getField().getName();
47: }
48:
49: public String toLongString() {
50: return "Access to" + fieldOwner.getField().toString();
51: }
52:
53: public String toShortString() {
54: return toLongString();
55: }
56:
57: public String toString() {
58: return toShortString();
59: }
60:
61: public int getModifiers() {
62: return fieldOwner.getField().getModifiers();
63: }
64:
65: public Class getDeclaringType() {
66: return fieldOwner.getField().getDeclaringClass();
67: }
68:
69: }
|