Package javassist.compiler
Class AccessorMaker
java.lang.Object
javassist.compiler.AccessorMaker
AccessorMaker maintains accessors to private members of an enclosing
class. It is necessary for compiling a method in an inner class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
getConstructor
(CtClass c, String desc, MethodInfo orig) getFieldGetter
(FieldInfo finfo, boolean is_static) Returns the method_info representing the added getter.getFieldSetter
(FieldInfo finfo, boolean is_static) Returns the method_info representing the added setter.getMethodAccessor
(String name, String desc, String accDesc, MethodInfo orig) Returns the name of the method for accessing a private method.
-
Field Details
-
clazz
-
uniqueNumber
private int uniqueNumber -
accessors
-
lastParamType
- See Also:
-
-
Constructor Details
-
AccessorMaker
-
-
Method Details
-
getConstructor
- 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
Returns the method_info representing the added getter.- Throws:
CompileError
-
getFieldSetter
Returns the method_info representing the added setter.- Throws:
CompileError
-
findAccessorName
-