diff options
Diffstat (limited to 'runtime/class_linker.h')
| -rw-r--r-- | runtime/class_linker.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index 8da979b36f..d3bb58dc33 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -1199,6 +1199,23 @@ class ClassLoadCallback { public: virtual ~ClassLoadCallback() {} + // If set we will replace initial_class_def & initial_dex_file with the final versions. The + // callback author is responsible for ensuring these are allocated in such a way they can be + // cleaned up if another transformation occurs. Note that both must be set or null/unchanged on + // return. + // Note: the class may be temporary, in which case a following ClassPrepare event will be a + // different object. It is the listener's responsibility to handle this. + // Note: This callback is rarely useful so a default implementation has been given that does + // nothing. + virtual void ClassPreDefine(const char* descriptor ATTRIBUTE_UNUSED, + Handle<mirror::Class> klass ATTRIBUTE_UNUSED, + Handle<mirror::ClassLoader> class_loader ATTRIBUTE_UNUSED, + const DexFile& initial_dex_file ATTRIBUTE_UNUSED, + const DexFile::ClassDef& initial_class_def ATTRIBUTE_UNUSED, + /*out*/DexFile const** final_dex_file ATTRIBUTE_UNUSED, + /*out*/DexFile::ClassDef const** final_dex_cache ATTRIBUTE_UNUSED) + REQUIRES_SHARED(Locks::mutator_lock_) {} + // A class has been loaded. // Note: the class may be temporary, in which case a following ClassPrepare event will be a // different object. It is the listener's responsibility to handle this. |