KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > util > IFieldInfo


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.core.util;
12
13 /**
14  * Description of a field info as described in the JVM
15  * specifications.
16  *
17  * This interface may be implemented by clients.
18  *
19  * @since 2.0
20  */

21 public interface IFieldInfo {
22
23     /**
24      * Answer back the constant value attribute of this field info if specified,
25      * null otherwise.
26      *
27      * @return the constant value attribute of this field info if specified,
28      * null otherwise
29      */

30     IConstantValueAttribute getConstantValueAttribute();
31     
32     /**
33      * Answer back the access flag of this field info.
34      *
35      * @return the access flag of this field info
36      */

37     int getAccessFlags();
38     
39     /**
40      * Answer back the name of this field info. The name is returned as
41      * specified in the JVM specifications.
42      *
43      * @return the name of this field info. The name is returned as
44      * specified in the JVM specifications
45      */

46     char[] getName();
47
48     /**
49      * Answer back the name index of this field info.
50      *
51      * @return the name index of this field info
52      */

53     int getNameIndex();
54     
55     /**
56      * Answer back the descriptor of this field info. The descriptor is returned as
57      * specified in the JVM specifications.
58      *
59      * @return the descriptor of this field info. The descriptor is returned as
60      * specified in the JVM specifications
61      */

62     char[] getDescriptor();
63
64     /**
65      * Answer back the descriptor index of this field info.
66      *
67      * @return the descriptor index of this field info
68      */

69     int getDescriptorIndex();
70
71     /**
72      * Return true if the field info has a constant value attribute, false otherwise.
73      *
74      * @return true if the field info has a constant value attribute, false otherwise
75      */

76     boolean hasConstantValueAttribute();
77
78     /**
79      * Return true if the field info is synthetic according to the JVM specification, false otherwise.
80      * <p>Note that prior to JDK 1.5, synthetic fields were always marked using
81      * an attribute; with 1.5, synthetic fields can also be marked using
82      * the {@link IModifierConstants#ACC_SYNTHETIC} flag.
83      * </p>
84      *
85      * @return true if the field info is synthetic according to the JVM specification, false otherwise
86      */

87     boolean isSynthetic();
88
89     /**
90      * Return true if the field info has a deprecated attribute, false otherwise.
91      *
92      * @return true if the field info has a deprecated attribute, false otherwise
93      */

94     boolean isDeprecated();
95     
96     /**
97      * Answer back the attribute number of the field info.
98      *
99      * @return the attribute number of the field info
100      */

101     int getAttributeCount();
102
103     
104     /**
105      * Answer back the collection of all attributes of the field info. It
106      * includes SyntheticAttribute, ConstantValueAttributes, etc.
107      * Returns an empty collection if none.
108      *
109      * @return the collection of all attributes of the field info. It
110      * includes SyntheticAttribute, ConstantValueAttributes, etc.
111      * Returns an empty collection if none
112      */

113     IClassFileAttribute[] getAttributes();
114 }
115
Popular Tags