Class RetargetableClassVisitor

java.lang.Object
org.objectweb.asm.ClassVisitor
org.apache.drill.exec.compile.RetargetableClassVisitor
Direct Known Subclasses:
DrillCheckClassAdapter

public class RetargetableClassVisitor extends org.objectweb.asm.ClassVisitor
An ASM ClassVisitor that allows for a late-bound delegate.

The ClassVisitor constructor takes an optional ClassVisitor argument to which all calls will be delegated. However, in some circumstances, ClassVisitor derivatives may not be able to specify the delegate until after they have called the ClassVisitor constructor themselves. In other words, they may not be able to specify the delegate until *after* they have called super(). This version of the ClassVisitor will support that via the use of the setDelegate(org.objectweb.asm.ClassVisitor) method.

  • Field Summary

    Fields inherited from class org.objectweb.asm.ClassVisitor

    api, cv
  • Constructor Summary

    Constructors
    Constructor
    Description
    See ClassVisitor(int).
    RetargetableClassVisitor(int api, org.objectweb.asm.ClassVisitor cv)
    See ClassVisitor(int, ClassVisitor).
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    setDelegate(org.objectweb.asm.ClassVisitor cv)
    Set the delegate for this ClassVisitor.

    Methods inherited from class org.objectweb.asm.ClassVisitor

    getDelegate, visit, visitAnnotation, visitAttribute, visitEnd, visitField, visitInnerClass, visitMethod, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RetargetableClassVisitor

      public RetargetableClassVisitor(int api)
      See ClassVisitor(int).
    • RetargetableClassVisitor

      public RetargetableClassVisitor(int api, org.objectweb.asm.ClassVisitor cv)
      See ClassVisitor(int, ClassVisitor).
  • Method Details

    • setDelegate

      protected void setDelegate(org.objectweb.asm.ClassVisitor cv)
      Set the delegate for this ClassVisitor. Must be called before the visitor is used (i.e., before any other methods are called), and only once.
      Parameters:
      cv - the ClassVisitor to delegate calls to