Package javassist.compiler
Class AccessorMaker
- java.lang.Object
-
- javassist.compiler.AccessorMaker
-
public class AccessorMaker extends Object
AccessorMaker maintains accessors to private members of an enclosing class. It is necessary for compiling a method in an inner class.
-
-
Constructor Summary
Constructors Constructor Description AccessorMaker(CtClass c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
AccessorMaker
public AccessorMaker(CtClass c)
-
-
Method Detail
-
getConstructor
public String getConstructor(CtClass c, String desc, MethodInfo orig) throws CompileError
- Throws:
CompileError
-
getMethodAccessor
public String getMethodAccessor(String name, String desc, String accDesc, MethodInfo orig) throws CompileError
Returns the name of the method for accessing a private method.- Parameters:
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 isclazz
. If the private method is static,accDesc
must be identical todesc
.orig
- the method info of the private method.- Returns:
- Throws:
CompileError
-
getFieldGetter
public MethodInfo getFieldGetter(FieldInfo finfo, boolean is_static) throws CompileError
Returns the method_info representing the added getter.- Throws:
CompileError
-
getFieldSetter
public MethodInfo getFieldSetter(FieldInfo finfo, boolean is_static) throws CompileError
Returns the method_info representing the added setter.- Throws:
CompileError
-
-