blob: 070130fc72a64501ba73441fab92c787adbaca4e [file] [log] [blame]
Ian Rogers08f753d2012-08-24 14:35:25 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ART_SRC_MODIFIERS_H_
18#define ART_SRC_MODIFIERS_H_
19
20static const uint32_t kAccPublic = 0x0001; // class, field, method, ic
21static const uint32_t kAccPrivate = 0x0002; // field, method, ic
22static const uint32_t kAccProtected = 0x0004; // field, method, ic
23static const uint32_t kAccStatic = 0x0008; // field, method, ic
24static const uint32_t kAccFinal = 0x0010; // class, field, method, ic
25static const uint32_t kAccSynchronized = 0x0020; // method (only allowed on natives)
26static const uint32_t kAccSuper = 0x0020; // class (not used in dex)
27static const uint32_t kAccVolatile = 0x0040; // field
28static const uint32_t kAccBridge = 0x0040; // method (1.5)
29static const uint32_t kAccTransient = 0x0080; // field
30static const uint32_t kAccVarargs = 0x0080; // method (1.5)
31static const uint32_t kAccNative = 0x0100; // method
32static const uint32_t kAccInterface = 0x0200; // class, ic
33static const uint32_t kAccAbstract = 0x0400; // class, method, ic
34static const uint32_t kAccStrict = 0x0800; // method
35static const uint32_t kAccSynthetic = 0x1000; // field, method, ic
36static const uint32_t kAccAnnotation = 0x2000; // class, ic (1.5)
37static const uint32_t kAccEnum = 0x4000; // class, field, ic (1.5)
38
39static const uint32_t kAccMiranda = 0x8000; // method
40
41static const uint32_t kAccJavaFlagsMask = 0xffff; // bits set from Java sources (low 16)
42
43static const uint32_t kAccConstructor = 0x00010000; // method (dex only)
44static const uint32_t kAccDeclaredSynchronized = 0x00020000; // method (dex only)
45static const uint32_t kAccClassIsProxy = 0x00040000; // class (dex only)
46
47// Special runtime-only flags.
48// Note: if only kAccClassIsReference is set, we have a soft reference.
49static const uint32_t kAccClassIsFinalizable = 0x80000000; // class/ancestor overrides finalize()
50static const uint32_t kAccClassIsReference = 0x08000000; // class is a soft/weak/phantom ref
51static const uint32_t kAccClassIsWeakReference = 0x04000000; // class is a weak reference
52static const uint32_t kAccClassIsFinalizerReference = 0x02000000; // class is a finalizer reference
53static const uint32_t kAccClassIsPhantomReference = 0x01000000; // class is a phantom reference
54
55static const uint32_t kAccReferenceFlagsMask = (kAccClassIsReference
56 | kAccClassIsWeakReference
57 | kAccClassIsFinalizerReference
58 | kAccClassIsPhantomReference);
59
60#endif // ART_SRC_MODIFIERS_H_
61