Script: Write out ASM Code to Generate Java Class (Mark II)
Posted by:
Robert Fischer
on 11/14/2010
Here’s an update to the Java class file to ASM script based on suggestions from Headius and Guillaume Laforge.
#!/usr/bin/env groovy import org.objectweb.asm.util.ASMifierClassVisitor as V @GrabResolver(name='ow2.org', root='http://maven.ow2.org/maven2/') @Grab(group='asm', module='asm-all', version='[3.3,)') private class JustHereForGrab {} V.main(this.args)
No need to muck with your grapeConfig.xml file with this script.
This post was by Robert Fischer, written on November 14, 2010.
Comment on this post: http://enfranchisedmind.com/blog/posts/java-to-asm-2/#respond
Public Permalink: http://enfranchisedmind.com/blog/posts/java-to-asm-2/

This article was a post on the EnfranchisedMind blog. EnfranchisedMind Blog by Robert Fischer, Brian Hurt, and Other Authors is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
Robert Fischer's complete blog can be found at: http://enfranchisedmind.com/blog
About Robert Fischer
Robert Fischer is a multi-language open source developer currently specializing in Groovy in Grails. In the past, his specialties have been in Perl, Java, Ruby, and OCaml. In the future, his specialty will probably be F# or (preferably) a functional JVM language like Scala or Clojure.
Robert is the author of Grails Persistence in GORM and GSQL, a regular contributor to GroovyMag and JSMag, the founder of the JConch Java concurrency library, and the author/maintainer of Liquibase-DSL and the Autobase database migration plugin for Grails.
More About Robert »NFJS, the Magazine
May Issue Now AvailableClient-Side MVC with Spine.js, Part 1
by Craig WallsOn Prototypal Inheritance, Part 2
by Raju GandhiMaking use of Scala Lazy Collections
by Venkat SubramaniamIntegration Testing Web Applications Using Gradle
by Kenneth Kousen