01: /*
02: * Bytecode Analysis Framework
03: * Copyright (C) 2003-2005, University of Maryland
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: */
19:
20: package edu.umd.cs.findbugs.ba;
21:
22: import edu.umd.cs.findbugs.classfile.FieldDescriptor;
23: import edu.umd.cs.findbugs.classfile.analysis.AnnotatedObject;
24:
25: /**
26: * Abstract representation of a field.
27: * Note that this is called "XField" to distinguish it from
28: * BCEL's Field class. Also, you can think of the "X" as expanding
29: * to "Instance" or "Static".
30: *
31: * <p> This interface and its implementations exist because Field
32: * objects in BCEL are awkward to deal with. They are not Comparable,
33: * it is difficult to find out what class they belong to, etc.</p>
34: *
35: * <p>
36: * If the resolved() method returns true, then any information queried
37: * from this object can be assumed to be accurate.
38: * If the resolved() method returns false, then FindBugs can't
39: * find the field and any information other than name/signature/etc.
40: * cannot be trusted.
41: * </p>
42: */
43: public interface XField extends ClassMember, AnnotatedObject {
44: /**
45: * Is the type of the field a reference type?
46: */
47: public boolean isReferenceType();
48:
49: /**
50: * Is this a volatile field?
51: */
52: public boolean isVolatile();
53:
54: /**
55: * @return FieldDescriptor referring to this field
56: */
57: public FieldDescriptor getFieldDescriptor();
58: }
59:
60: // vim:ts=4
|