Class AccessorMaker


  • public class AccessorMaker
    extends java.lang.Object
    AccessorMaker maintains accessors to private members of an enclosing class. It is necessary for compiling a method in an inner class.
    • Field Detail

      • uniqueNumber

        private int uniqueNumber
      • accessors

        private java.util.Map<java.lang.String,​java.lang.Object> accessors
    • Constructor Detail

      • AccessorMaker

        public AccessorMaker​(CtClass c)
    • Method Detail

      • getMethodAccessor

        public java.lang.String getMethodAccessor​(java.lang.String name,
                                                  java.lang.String desc,
                                                  java.lang.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 is clazz. If the private method is static, accDesc must be identical to desc.
        orig - the method info of the private method.
        Returns:
        Throws:
        CompileError
      • findAccessorName

        private java.lang.String findAccessorName​(ClassFile cf)