KickJava   Java API By Example, From Geeks To Geeks.

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


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
7
// http://www.mozilla.org/MPL/
8
//
9
// 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 import java.lang.reflect.*;
29 import ch.ethz.jvmai.FieldSignature;
30 import ch.ethz.jvmai.FieldJoinPoint;
31
32 /**
33  * FieldSignature defines ...
34  *
35  * @version $Revision: 1.1.1.1 $
36  * @author popovici
37  */

38 public class FieldSignatureImpl implements FieldSignature
39  {
40    protected FieldJoinPoint fieldOwner;
41
42    public FieldSignatureImpl(FieldJoinPointImpl x)
43      {
44        fieldOwner = x;
45      }
46
47    public String JavaDoc getName()
48      {
49        return fieldOwner.getField().getName();
50      }
51
52    public String JavaDoc toLongString()
53      {
54        return "Access to" + fieldOwner.getField().toString();
55      }
56
57    public String JavaDoc toShortString()
58      {
59        return toLongString();
60      }
61
62    public String JavaDoc toString()
63      {
64        return toShortString();
65      }
66
67    public int getModifiers()
68      {
69        return fieldOwner.getField().getModifiers();
70      }
71
72    public Class JavaDoc getDeclaringType()
73      {
74        return fieldOwner.getField().getDeclaringClass();
75      }
76
77
78  }
79
Popular Tags