Skip to content

Instantly share code, notes, and snippets.

@mikebrock
Created June 20, 2011 18:31
Show Gist options
  • Save mikebrock/1036231 to your computer and use it in GitHub Desktop.
Save mikebrock/1036231 to your computer and use it in GitHub Desktop.
String cls = ClassBuilder.implement(Bootstrapper.class)
.publicMethod(InterfaceInjectionContext.class, "bootstrapContainer")
.append(Stmt.create().addVariable("ctx", Stmt.create().newObject(InterfaceInjectionContext.class)))
.append(Stmt.create().loadVariable("ctx").returnValue())
.finish().toJavaString();
---[output]----
package org.jboss.errai.ioc.client.api;
public class BootstrapperImpl implements org.jboss.errai.ioc.client.api.Bootstrapper {
public org.jboss.errai.ioc.client.InterfaceInjectionContext bootstrapContainer() {
org.jboss.errai.ioc.client.InterfaceInjectionContext ctx = new org.jboss.errai.ioc.client.InterfaceInjectionContext();
return ctx;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment