Lines Matching refs:Handle
33 template<class T> class Handle;
35 // Handles are memory locations that contain GC roots. As the mirror::Object*s within a handle are
37 // a wrap pointer. Handles are generally allocated within HandleScopes. Handle is a super-class
40 class Handle : public ValueObject {
42 Handle() : reference_(nullptr) {
45 ALWAYS_INLINE Handle(const Handle<T>& handle) = default;
47 ALWAYS_INLINE Handle<T>& operator=(const Handle<T>& handle) = default;
49 ALWAYS_INLINE explicit Handle(StackReference<T>* reference) : reference_(reference) {
94 explicit Handle(StackReference<S>* reference)
98 explicit Handle(const Handle<S>& handle)
99 : reference_(handle.reference_) {
106 template<class S> friend class Handle;
114 class MutableHandle : public Handle<T> {
119 ALWAYS_INLINE MutableHandle(const MutableHandle<T>& handle)
122 ALWAYS_INLINE MutableHandle<T>& operator=(const MutableHandle<T>& handle)
127 : Handle<T>(reference) {
131 StackReference<mirror::Object>* ref = Handle<T>::GetReference();
138 StackReference<mirror::Object>* ref = Handle<T>::GetReference();
146 explicit MutableHandle(const MutableHandle<S>& handle) REQUIRES_SHARED(Locks::mutator_lock_)
147 : Handle<T>(handle) {
152 : Handle<T>(reference) {
162 // A special case of Handle that only holds references to null. Invalid when if it goes out of
163 // scope. Example: Handle<T> h = ScopedNullHandle<T> will leave h being undefined.
165 class ScopedNullHandle : public Handle<T> {
167 ScopedNullHandle() : Handle<T>(&null_ref_) {}