Exemple #1
0
func _getGoField(fieldObj *heap.Object) *heap.Field {
	extra := fieldObj.Extra()
	if extra != nil {
		return extra.(*heap.Field)
	}

	root := fieldObj.GetFieldValue("root", "Ljava/lang/reflect/Field;").(*heap.Object)
	return root.Extra().(*heap.Field)
}
Exemple #2
0
func _extraThread(threadObj *heap.Object) *rtda.Thread {
	threadObj.RLockState()
	defer threadObj.RUnlockState()

	extra := threadObj.Extra()
	if extra == nil {
		return nil
	} else {
		return extra.(*rtda.Thread)
	}
}
Exemple #3
0
func _getGoMethod(methodObj *heap.Object, isConstructor bool) *heap.Method {
	extra := methodObj.Extra()
	if extra != nil {
		return extra.(*heap.Method)
	}

	if isConstructor {
		root := methodObj.GetFieldValue("root", "Ljava/lang/reflect/Constructor;").(*heap.Object)
		return root.Extra().(*heap.Method)
	} else {
		root := methodObj.GetFieldValue("root", "Ljava/lang/reflect/Method;").(*heap.Object)
		return root.Extra().(*heap.Method)
	}
}