Class TransformCall

    • Field Detail

      • classname

        protected java.lang.String classname
      • methodname

        protected java.lang.String methodname
      • methodDescriptor

        protected java.lang.String methodDescriptor
      • newClassname

        protected java.lang.String newClassname
      • newMethodname

        protected java.lang.String newMethodname
      • newMethodIsPrivate

        protected boolean newMethodIsPrivate
      • newIndex

        protected int newIndex
    • Method Detail

      • transform

        public int transform​(CtClass clazz,
                             int pos,
                             CodeIterator iterator,
                             ConstPool cp)
                      throws BadBytecode
        Modify INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC and INVOKEVIRTUAL so that a different method is invoked. The class name in the operand of these instructions might be a subclass of the target class specified by classname. This method transforms the instruction in that case unless the subclass overrides the target method.
        Specified by:
        transform in class Transformer
        Throws:
        BadBytecode
      • matchClass

        private boolean matchClass​(java.lang.String name,
                                   ClassPool pool)