forked from AeonLucid/AndroidNativeEmu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
198 additions
and
20 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from androidemu.java.java_class_def import JavaClassDef | ||
from androidemu.java.java_field_def import JavaFieldDef | ||
from androidemu.java.java_method_def import JavaMethodDef | ||
|
||
|
||
class Constructor(metaclass=JavaClassDef, | ||
jvm_name='java/lang/reflect/Constructor', | ||
jvm_fields=[ | ||
JavaFieldDef('slot', 'I', False), | ||
JavaFieldDef('declaringClass', 'Ljava/lang/Class;', False) | ||
]): | ||
|
||
def __init__(self, clazz: JavaClassDef, method: JavaMethodDef): | ||
self._clazz = clazz | ||
self._method = method | ||
self.slot = method.jvm_id | ||
self.declaringClass = self._clazz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from androidemu.java.classes.constructor import Constructor | ||
from androidemu.java.java_class_def import JavaClassDef | ||
from androidemu.java.java_field_def import JavaFieldDef | ||
from androidemu.java.java_method_def import java_method_def, JavaMethodDef | ||
|
||
|
||
class Method(metaclass=JavaClassDef, | ||
jvm_name='java/lang/reflect/Method', | ||
jvm_fields=[ | ||
JavaFieldDef('slot', 'I', False), | ||
JavaFieldDef('declaringClass', 'Ljava/lang/Class;', False), | ||
]): | ||
|
||
def __init__(self, clazz: JavaClassDef, method: JavaMethodDef): | ||
self._clazz = clazz | ||
self._method = method | ||
self.slot = method.jvm_id | ||
self.declaringClass = self._clazz | ||
|
||
@staticmethod | ||
@java_method_def( | ||
name="getMethodModifiers", | ||
signature="(Ljava/lang/Class;I)I", | ||
args_list=['jobject', 'jint'] | ||
) | ||
def get_method_modifiers(emu, clazz_obj, jvm_method_id): | ||
clazz = clazz_obj.value | ||
method = clazz.find_method_by_id(jvm_method_id) | ||
|
||
# TODO: Implement | ||
|
||
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
class jvalue: | ||
|
||
def __init__(self, value=None): | ||
self.value = value | ||
|
||
|
||
class jobject: | ||
|
||
def __init__(self, value=None): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters