Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.max.cri/src/com/sun/cri/ri/RiResolvedField.java @ 3733:e233f5660da4
Added Java files from Maxine project.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 17 Dec 2011 19:59:18 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3732:3e2e8b8abdaf | 3733:e233f5660da4 |
---|---|
1 /* | |
2 * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
23 package com.sun.cri.ri; | |
24 | |
25 import java.lang.annotation.*; | |
26 import java.lang.reflect.*; | |
27 | |
28 import com.sun.cri.ci.*; | |
29 | |
30 /** | |
31 * Represents a reference to a resolved field. Fields, like methods and types, are | |
32 * resolved through {@link RiConstantPool constant pools}, and their actual implementation is provided by the | |
33 * {@link RiRuntime runtime} to the compiler. | |
34 */ | |
35 public interface RiResolvedField extends RiField { | |
36 | |
37 /** | |
38 * Gets the access flags for this field. Only the flags specified in the JVM specification | |
39 * will be included in the returned mask. The utility methods in the {@link Modifier} class | |
40 * should be used to query the returned mask for the presence/absence of individual flags. | |
41 * @return the mask of JVM defined field access flags defined for this field | |
42 */ | |
43 int accessFlags(); | |
44 | |
45 /** | |
46 * Gets the constant value of this field if available. | |
47 * @param receiver object from which this field's value is to be read. This value is ignored if this field is static. | |
48 * @return the constant value of this field or {@code null} if the constant value is not available | |
49 */ | |
50 CiConstant constantValue(CiConstant receiver); | |
51 | |
52 /** | |
53 * Gets the holder of this field as a compiler-runtime interface type. | |
54 * @return the holder of this field | |
55 */ | |
56 RiResolvedType holder(); | |
57 | |
58 /** | |
59 * Returns this field's annotation of a specified type. | |
60 * | |
61 * @param annotationClass the Class object corresponding to the annotation type | |
62 * @return the annotation of type {@code annotationClass} for this field if present, else null | |
63 */ | |
64 <T extends Annotation> T getAnnotation(Class<T> annotationClass); | |
65 } |