KickJava   Java API By Example, From Geeks To Geeks.

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


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
// $Id: FieldModificationJoinPointImpl.java,v 1.1.1.1 2003/07/02 15:30:50 apopovic Exp $
22
// =====================================================================
23
//
24
// (history at end)
25
//
26

27 package ch.ethz.inf.iks.jvmai.jvmdi;
28
29 // used packages/classes
30
import ch.ethz.jvmai.FieldJoinPoint;
31 import ch.ethz.jvmai.FieldModificationJoinPoint;
32
33 /**
34  * Class FieldModificationJoinPoint represents a joinpoint where
35  * a field is read.
36  *
37  * @version $Revision: 1.1.1.1 $
38  * @author Andrei Popovici
39  */

40 public class FieldModificationJoinPointImpl
41        extends FieldJoinPointImpl
42        implements FieldModificationJoinPoint
43 {
44
45     private Integer JavaDoc intNewValue = new Integer JavaDoc(1);
46     private Boolean JavaDoc booleanNewValue = new Boolean JavaDoc(false);
47     private Short JavaDoc shortNewValue = new Short JavaDoc((short)1);
48     private Float JavaDoc floatNewValue = new Float JavaDoc(1.0);
49     private Double JavaDoc doubleNewValue = new Double JavaDoc(1.0);
50     private Byte JavaDoc byteNewValue = new Byte JavaDoc((byte)1);
51     private Long JavaDoc longNewValue = new Long JavaDoc(1);
52     private Character JavaDoc charNewValue = new Character JavaDoc('a');
53
54     protected Object JavaDoc newValue;
55
56     protected FieldModificationJoinPointImpl(ControlFlow cflow, JoinPointContext ctx)
57     {
58     super(cflow,ctx);
59     }
60
61   /** Read the new value
62    */

63     public Object JavaDoc getNewValue()
64     {
65     return newValue;
66     }
67
68   /** set the new value
69    */

70     public void setNewValue(Object JavaDoc newValue)
71     {
72     throw new RuntimeException JavaDoc("not implemented");
73     }
74
75   /** Return the kind of this join-point
76    */

77     public String JavaDoc getKind()
78     {
79     return FieldModificationJoinPoint.KIND;
80     }
81
82   public int getMask()
83     {
84       return MASK_CODE_JP |MASK_FIELD_JP | MASK_FIELD_MODIFICATION_JP;
85     }
86
87 }
88
89 //======================================================================
90
//
91
// $Log: FieldModificationJoinPointImpl.java,v $
92
// Revision 1.1.1.1 2003/07/02 15:30:50 apopovic
93
// Imported from ETH Zurich
94
//
95
// Revision 1.4 2003/05/05 17:46:25 popovici
96
// Refactorization step (runes->prose) cleanup
97
//
98
// Revision 1.3 2003/04/17 08:47:04 popovici
99
// Important functionality additions
100
// - Cflow specializers
101
// - Restructuring of the MethodCut, SetCut, ExceptionCut, and GetCut (they are much smaller)
102
// - Transactional capabilities
103
// - Total refactoring of Specializer evaluation, which permits fine-grained distinction
104
// between static and dynamic specializers.
105
// - Functionality pulled up in abstract classes
106
// - Uniformization of advice methods patterns and names
107
//
108
// Revision 1.2 2003/03/04 16:09:35 popovici
109
// Documentation improvements
110
//
111
// Revision 1.1 2003/03/04 11:26:35 popovici
112
// Important refactorization step (march):
113
// - removal of 'JoinPointEvents'; JoinPoints now have the same function as events
114
// - reimplementation of the JVMAIDebuggerAspectInterface (better performance, coding conventions, removal of ProseVM
115
// structures
116
//
117
// Revision 1.4 2002/03/28 13:48:25 popovici
118
// Mozilla-ified
119
//
120
// Revision 1.3 2002/02/13 12:24:25 smarkwal
121
// spaces/tabs alignment corrected
122
//
123
// Revision 1.2 2002/01/24 12:46:22 smarkwal
124
// comments added
125
//
126
// Revision 1.1 2001/12/14 15:01:14 smarkwal
127
// Initial Revision
128
//
129
Popular Tags