comparison graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/ResolvedJavaField.java @ 7530:5e3d1a68664e

applied mx eclipseformat to all Java files
author Doug Simon <doug.simon@oracle.com>
date Wed, 23 Jan 2013 16:34:57 +0100
parents dd81042f4eb1
children f3330a4487eb
comparison
equal deleted inserted replaced
7529:4a11124a3563 7530:5e3d1a68664e
24 24
25 import java.lang.annotation.*; 25 import java.lang.annotation.*;
26 import java.lang.reflect.*; 26 import java.lang.reflect.*;
27 27
28 /** 28 /**
29 * Represents a reference to a resolved Java field. Fields, like methods and types, are resolved through 29 * Represents a reference to a resolved Java field. Fields, like methods and types, are resolved
30 * {@link ConstantPool constant pools}. 30 * through {@link ConstantPool constant pools}.
31 */ 31 */
32 public interface ResolvedJavaField extends JavaField { 32 public interface ResolvedJavaField extends JavaField {
33 33
34 /** 34 /**
35 * Returns the Java language modifiers for this field, as an integer. The {@link Modifier} class should be used to 35 * Returns the Java language modifiers for this field, as an integer. The {@link Modifier} class
36 * decode the modifiers. Only the {@linkplain Modifier#fieldModifiers() field flags} specified in the JVM 36 * should be used to decode the modifiers. Only the {@linkplain Modifier#fieldModifiers() field
37 * specification will be included in the returned mask. 37 * flags} specified in the JVM specification will be included in the returned mask.
38 */ 38 */
39 int getModifiers(); 39 int getModifiers();
40 40
41 /** 41 /**
42 * Determines if this field was injected by the VM. Such a field, for example, is not derived from a class file. 42 * Determines if this field was injected by the VM. Such a field, for example, is not derived
43 * from a class file.
43 */ 44 */
44 boolean isInternal(); 45 boolean isInternal();
45 46
46 /** 47 /**
47 * Gets the constant value of this field for a given object, if available. 48 * Gets the constant value of this field for a given object, if available.
48 * 49 *
49 * @param receiver object from which this field's value is to be read. This value is ignored if this field is 50 * @param receiver object from which this field's value is to be read. This value is ignored if
50 * static. 51 * this field is static.
51 * @return the constant value of this field or {@code null} if the constant value is not available 52 * @return the constant value of this field or {@code null} if the constant value is not
53 * available
52 */ 54 */
53 Constant readConstantValue(Constant receiver); 55 Constant readConstantValue(Constant receiver);
54 56
55 /** 57 /**
56 * Gets the current value of this field for a given object, if available. 58 * Gets the current value of this field for a given object, if available.
57 * 59 *
58 * @param receiver object from which this field's value is to be read. This value is ignored if this field is 60 * @param receiver object from which this field's value is to be read. This value is ignored if
59 * static. 61 * this field is static.
60 * @return the value of this field or {@code null} if the value is not available (e.g., because the field holder is 62 * @return the value of this field or {@code null} if the value is not available (e.g., because
61 * not yet initialized). 63 * the field holder is not yet initialized).
62 */ 64 */
63 Constant readValue(Constant receiver); 65 Constant readValue(Constant receiver);
64 66
65 /** 67 /**
66 * Returns the {@link ResolvedJavaType} object representing the class or interface that declares this field. 68 * Returns the {@link ResolvedJavaType} object representing the class or interface that declares
69 * this field.
67 */ 70 */
68 ResolvedJavaType getDeclaringClass(); 71 ResolvedJavaType getDeclaringClass();
69 72
70 /** 73 /**
71 * Returns the annotation for the specified type of this field, if such an annotation is present. 74 * Returns the annotation for the specified type of this field, if such an annotation is
72 * 75 * present.
76 *
73 * @param annotationClass the Class object corresponding to the annotation type 77 * @param annotationClass the Class object corresponding to the annotation type
74 * @return this element's annotation for the specified annotation type if present on this field, else {@code null} 78 * @return this element's annotation for the specified annotation type if present on this field,
79 * else {@code null}
75 */ 80 */
76 <T extends Annotation> T getAnnotation(Class<T> annotationClass); 81 <T extends Annotation> T getAnnotation(Class<T> annotationClass);
77 } 82 }