01: /* PutFieldOperator Copyright (C) 1998-2002 Jochen Hoenicke.
02: *
03: * This program is free software; you can redistribute it and/or modify
04: * it under the terms of the GNU Lesser General Public License as published by
05: * the Free Software Foundation; either version 2, or (at your option)
06: * any later version.
07: *
08: * This program is distributed in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11: * GNU General Public License for more details.
12: *
13: * You should have received a copy of the GNU Lesser General Public License
14: * along with this program; see the file COPYING.LESSER. If not, write to
15: * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
16: *
17: * $Id: PutFieldOperator.java,v 4.24.2.1 2002/05/28 17:34:06 hoenicke Exp $
18: */
19:
20: package jode.expr;
21:
22: import jode.type.Type;
23: import jode.type.NullType;
24: import jode.type.ClassInterfacesType;
25: import jode.bytecode.Reference;
26: import jode.bytecode.ClassInfo;
27: import jode.bytecode.FieldInfo;
28: import jode.decompiler.MethodAnalyzer;
29: import jode.decompiler.ClassAnalyzer;
30: import jode.decompiler.FieldAnalyzer;
31: import jode.decompiler.TabbedPrintWriter;
32: import jode.decompiler.Scope;
33:
34: public class PutFieldOperator extends FieldOperator implements
35: LValueExpression {
36:
37: public PutFieldOperator(MethodAnalyzer methodAnalyzer,
38: boolean staticFlag, Reference ref) {
39: super (methodAnalyzer, staticFlag, ref);
40: }
41:
42: public boolean matches(Operator loadop) {
43: return loadop instanceof GetFieldOperator
44: && ((GetFieldOperator) loadop).ref.equals(ref);
45: }
46:
47: public boolean opEquals(Operator o) {
48: return o instanceof PutFieldOperator
49: && ((PutFieldOperator) o).ref.equals(ref);
50: }
51: }
|