public class AccessorMaker extends Object
| Constructor and Description |
|---|
AccessorMaker(CtClass c) |
| Modifier and Type | Method and Description |
|---|---|
String |
getConstructor(CtClass c,
String desc,
MethodInfo orig) |
MethodInfo |
getFieldGetter(FieldInfo finfo,
boolean is_static)
Returns the method_info representing the added getter.
|
MethodInfo |
getFieldSetter(FieldInfo finfo,
boolean is_static)
Returns the method_info representing the added setter.
|
String |
getMethodAccessor(String name,
String desc,
String accDesc,
MethodInfo orig)
Returns the name of the method for accessing a private method.
|
public AccessorMaker(CtClass c)
public String getConstructor(CtClass c, String desc, MethodInfo orig) throws CompileError
CompileErrorpublic String getMethodAccessor(String name, String desc, String accDesc, MethodInfo orig) throws CompileError
name - the name of the private method.desc - the descriptor of the private method.accDesc - the descriptor of the accessor method. The first
parameter type is clazz.
If the private method is static,
accDesc must be identical to desc.orig - the method info of the private method.CompileErrorpublic MethodInfo getFieldGetter(FieldInfo finfo, boolean is_static) throws CompileError
CompileErrorpublic MethodInfo getFieldSetter(FieldInfo finfo, boolean is_static) throws CompileError
CompileErrorCopyright © 2016 Shigeru Chiba, www.javassist.org. All Rights Reserved.