public class MethodWriter extends Object
Modifier and Type | Method and Description |
---|---|
static javassist.CtMethod |
addGetter(javassist.CtClass target,
String field,
String name) |
static int |
addMethod(javassist.bytecode.ConstPool cPool,
javassist.CtMethod method) |
static javassist.CtMethod |
addSetter(javassist.CtClass target,
String field,
String name) |
static javassist.CtMethod |
write(javassist.CtClass target,
String format,
Object... args)
convenience method that builds a method from a format string.
|
public static javassist.CtMethod write(javassist.CtClass target, String format, Object... args) throws javassist.CannotCompileException
String.format
for more detailsjavassist.CannotCompileException
public static javassist.CtMethod addGetter(javassist.CtClass target, String field, String name)
public static javassist.CtMethod addSetter(javassist.CtClass target, String field, String name)
public static int addMethod(javassist.bytecode.ConstPool cPool, javassist.CtMethod method)
Copyright © 2016 JBoss by Red Hat. All rights reserved.