diff options
author | 2018-02-20 08:44:20 +0000 | |
---|---|---|
committer | 2018-03-06 11:56:26 +0000 | |
commit | a2649fce613e353f14bb4bed3ea239e157df70eb (patch) | |
tree | 785b510ee107c1483780107f4912d5e71498fe18 /runtime/mirror/class.h | |
parent | 0f6c3ec0971af7be632ab7ee3286791e6e0a9418 (diff) |
ART: Fixes for constructor parameter annotations
Synthesize empty parameter annotations for implicit parameters on
constructors. Reflective methods for recovering parameter annotations
expect them to be present though they may not be present in the DEX file.
(cherry-picked from commit 58143d2c47734c46c1fa4855cb603c24f2d15454)
Bug: b/68033708
Test: art/test/run-test --host 715
Change-Id: I0827c7e71ff7c7e044fc9dd6c5aac639a0e1a4c6
Diffstat (limited to 'runtime/mirror/class.h')
-rw-r--r-- | runtime/mirror/class.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h index a1d0ff7374..6000317c85 100644 --- a/runtime/mirror/class.h +++ b/runtime/mirror/class.h @@ -186,6 +186,11 @@ class MANAGED Class FINAL : public Object { void SetAccessFlags(uint32_t new_access_flags) REQUIRES_SHARED(Locks::mutator_lock_); + // Returns true if the class is an enum. + ALWAYS_INLINE bool IsEnum() REQUIRES_SHARED(Locks::mutator_lock_) { + return (GetAccessFlags() & kAccEnum) != 0; + } + // Returns true if the class is an interface. ALWAYS_INLINE bool IsInterface() REQUIRES_SHARED(Locks::mutator_lock_) { return (GetAccessFlags() & kAccInterface) != 0; |