同步操作将从 Small Warm/asmsupport 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
The asmsupport is a java class byte code operate library, it make easier to write or modify a class at runtime. This framework developed base on asm framework, but different from asm that avoid use original jvm instruction and avoid maintain stack and local variables.
asmsupport
|-src/main/java
|-java : Maven standard source
|-.../asmsupport
|-standard : The asmsupport api
|-client : The dummy api
|-core : The asmsupport core implements
|-resource : Maven standard source resources
|-src/test
|-java : Maven standard test
|-resource : Maven standard test resources
|-src/third/java : The third-part source code(as source folder)
|-src/issue/java : The fixed bug test code(as test folder)
|-src/sample/java : The some simple exampe.(as test folder)
|-oldApi : The old api example.
|-dummy : The dummy api example
|-json : The simple json serialization tool use asmsupport
|-proxy : The simple dynamic proxy framework use asmsupport
|-src/site : The project document site folder.
Preceding is all of the sources folder structure and descriptions, if you want import the project to eclipse, you must be manual use ["src/third/java", "src/issue/java", "src/sample/java"] as source folder.
<dependency>
<groupId>cn.wensiqun</groupId>
<artifactId>asmsupport</artifactId>
<version>x.x.x</version>
</dependency>
The last stable version is 0.4
Asmsupport is licensed under the GNU Lesser General Public License (LGPL)
The following code will generate.
public class FirstCase {
public static void main(String[] args) {
System.out.println("Hello ASMSupport.");
}
}
The following is code to generate preceding case.
DummyClass dummy = new DummyClass("FirstCase").public_()
.newMethod("main").public_().static_().argTypes(String[].class)
.body(new MethodBody(){
public void body(LocalVariable... args) {
call(defType(System.class).field("out"), "println", val("Hello ASMSupport."))
return_();
}
});
Class<?> FirstCaseClass = dummy.build();
//The following code will use reflection to call main method.
Method mainMethod = FirstCaseClass.getMethod("main", String[].class);
mainMethod.invoke(FirstCaseClass, mainMethod);
The JSON sample under the folder "src/sample/java/json", run the json.demo.Runner main method, and you can get the generated class in folder "target/sample/json".
The Proxy sample under the folder "src/sample/java/proxy", run the json.demo.Runner main method, and you can get the generated class in folder "target/sample/proxy".
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。