MyToolsJava 工具包
该 jar 包对 java 调用 Groovy 、JavaScript、Clojure 脚本语言的接口进行封装,方便在java程序中进行多语言混合编程
在jar中增加对URLClassLoader类进行继承重写实现动态加载和拆卸jar,使用Message类进行jar插件间的解耦调用。
包管理工具采用 Gradle 进行管理
MyTools工具类旧版本git地址 : https://gitee.com/iproject/MyTools.git
MyTools工具类最新版本git地址:https://gitee.com/iproject/MyTools2.git
使用示例:
@Test public void testJava() throws Exception { JavaHepler jh = new JavaHepler(); //jh.putPath("Test", "test.Test"); //IMethod d = jh.newInstance("Test"); //or IMethod d = jh.newInstance("test.Test"); IInvoke i = d.getMethod("p"); i.invoke(); i = d.getMethod("p2"); i.invoke("MyTools"); } //@Test public void javaScript() { long b = System.currentTimeMillis(); String[] s = new String[] { "test/test.js" }; JSHelper js = new JSHelper(s); js.addField("ca").javaToJs(System.out); System.out.println(js.getMethod("test").invoke()); js.exit(); long e = System.currentTimeMillis(); System.out.println("js :" + (e - b)); } //@Test public void groovy() throws Exception { String file = "test/Test.groovy"; long b = System.currentTimeMillis(); GroovyHelper gh = new GroovyHelper(); //gh.putPath("Test", file); //gh.newInstance("Test").getMethod("t").invoke(); //or gh.newInstance(file).getMethod("t").invoke(); long e = System.currentTimeMillis(); System.out.println("Groovy :" + (e - b)); } //@Test public void clojure() throws Exception { String file = "test/test_t.clj"; long b = System.currentTimeMillis(); ClojureHelper cl = new ClojureHelper(); //cl.putPath("test", file); //IMethod c = cl.newInstance("test"); //or IMethod c = cl.newInstance(file); IInvoke i = c.getMethod("t3"); System.out.println(i.invoke(4)); long e = System.currentTimeMillis(); System.out.println("clojure :" + (e - b)); } //@Test public void jython() throws Exception { String file = "test/Test.py"; long b = System.currentTimeMillis(); JythonHelper jy = new JythonHelper(); //jy.putPath("Test", file); //jy.newInstance("Test").getMethod("t").invoke(); //or jy.newInstance(file).getMethod("t").invoke(); long e = System.currentTimeMillis(); System.out.println("jython :" + (e - b)); } //@Test public void jruby() throws Exception { String file = "test/Rr.rb"; long b = System.currentTimeMillis(); JRubyHelper jr = new JRubyHelper(); //jr.putPath("Rr", file); //Object obj = jr.newInstance("Rr").getMethod("c2f").invoke(100); //or Object obj = jr.newInstance(file).getMethod("c2f").invoke(100); System.out.println(obj); long e = System.currentTimeMillis(); System.out.println("jruby :" + (e - b)); } //@Test public void beanShell() throws EvalError, IOException{ long b = System.currentTimeMillis(); BeanShellHelper bsh = new BeanShellHelper(); bsh.getFied("a").set("Hello World"); bsh.load("test/test.bsh"); System.out.println(bsh.getFied("b").get()); long e = System.currentTimeMillis(); System.out.println("jruby :" + (e - b)); }
增加对beanShell调用的支持
评论
gsm-ussdUSSD工具包
gsm-ussd提供一些Linux下的命令行工具包,用来通过UMTS和GSM调制解调器发送USSD查询,查询的结果包括当前帐号的预付费余额、SIM卡的电话号码等等很多其他信息,这个主要依赖GSM的网络
gsm-ussdUSSD工具包
0
IcoMoonKitIcoMoon 工具包
IcoMoonKit是用Swift编写的IcoMoon工具包。要求:iOS7.0orlaterXcode6.1orlater安装CloneIcoMoonKitasagitsubmodule.AddIc
IcoMoonKitIcoMoon 工具包
0
DijitDojo工具包
Dijit基于Dojo,也是学习Dojo扩展的一个好起点。可以用来创建非常漂亮的Web2.0GUI。支持多语种,甚至支持不同语种的文字书写方向以及本地化数字,日期等等。
DijitDojo工具包
0
SWFToolsFlash 工具包
SWFTools是一组用来处理Flash的swf文件的工具包,包括:1.合并工具swfcombine2.抽取工具swfextract3.PDF/JPEG/PNG/AVI/TTF/WAV到SWF的转换工
SWFToolsFlash 工具包
0
DotNetZipZIP工具包
DotNetZip是一个短小易用的用来操作zip文件的.NET应用,可以在.NET的任何一种语言中使用。代码示例:try{using(ZipFilezip=newZipFile("MyZipFile.
DotNetZipZIP工具包
0
BeanUtilsJavaBean 工具包
commons-beanutils是apachecommons子项目中的一个软件包,其主要目的是利用反射机制对JavaBean的属性进行处理。Maven:<dependency> <
BeanUtilsJavaBean 工具包
0
itoolsPython 工具包
itools是一个Python语言的编程工具库,提供了大量常用的功能,其中包括:文件和目录资源的抽象接口、搜索引擎、类型混淆、国际化支持、URI处理、Web编程接口、工作量接口,同时支持(X)HTML
itoolsPython 工具包
0