diff options
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; |