feat: 新增 Console 和 reflect 部分完善 command

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
2017-10-10 21:01:43 +08:00
parent 59b2824413
commit d0b43487c2
14 changed files with 281 additions and 95 deletions

View File

@ -0,0 +1,21 @@
/**
* 控制台输出类
*/
/*global base*/
var log = base.getLog().static;
var Level = Java.type('java.util.logging.Level');
var console = {
log: function () {
log.i(arguments.join(' '));
},
warn: function () {
log.w(arguments.join(' '));
},
error: function () {
log.log(Level.SEVERE, arguments.join(' '));
},
debug: function () {
log.d(arguments.join(' '));
}
};
global.console = console;