Example #1
0
  public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) {
    if (shouldBeMarkedAsUsed(refConstant)) {
      markAsUsed(refConstant);

      markConstant(clazz, refConstant.u2classIndex);
      markConstant(clazz, refConstant.u2nameAndTypeIndex);

      // When compiled with "-target 1.2" or higher, the class or
      // interface actually containing the referenced class member may
      // be higher up the hierarchy. Make sure it's marked, in case it
      // isn't used elsewhere.
      refConstant.referencedClassAccept(this);

      // Mark the referenced class member itself.
      refConstant.referencedMemberAccept(this);
    }
  }
 public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) {
   // Let the visitor visit the class referenced in the reference constant.
   refConstant.referencedClassAccept(classVisitor);
 }