diff options
Diffstat (limited to 'runtime/class_table.h')
-rw-r--r-- | runtime/class_table.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/class_table.h b/runtime/class_table.h index c8ec28eca4..711eae45b8 100644 --- a/runtime/class_table.h +++ b/runtime/class_table.h @@ -192,6 +192,12 @@ class ClassTable { REQUIRES(!lock_) REQUIRES_SHARED(Locks::mutator_lock_); + // Try to insert a class and return the inserted class if successful. If another class + // with the same descriptor is already in the table, return the existing entry. + ObjPtr<mirror::Class> TryInsert(ObjPtr<mirror::Class> klass) + REQUIRES(!lock_) + REQUIRES_SHARED(Locks::mutator_lock_); + void Insert(ObjPtr<mirror::Class> klass) REQUIRES(!lock_) REQUIRES_SHARED(Locks::mutator_lock_); |