/** * An order-sensitive invocation of {@link ClassVisitor#visitOuterClass(String, String, String)}. * * @param owner The outer class's internal name. * @param name The outer method's name or {@code null} if it does not exist. * @param descriptor The outer method's descriptor or {@code null} if it does not exist. */ protected void onVisitOuterClass(String owner, String name, String descriptor) { super.visitOuterClass(owner, name, descriptor); }
/** * Visits the enclosing class of the class. This method must be called only if the class has an * enclosing class. * * @param owner internal name of the enclosing class of the class. * @param name the name of the method that contains the class, or {@literal null} if the class is * not enclosed in a method of its enclosing class. * @param descriptor the descriptor of the method that contains the class, or {@literal null} if * the class is not enclosed in a method of its enclosing class. */ public void visitOuterClass(final String owner, final String name, final String descriptor) { if (cv != null) { cv.visitOuterClass(owner, name, descriptor); } }
@Override public void visitOuterClass(String ownerTypeInternalName, String methodName, String methodDescriptor) { observedTypes.add(ownerTypeInternalName); super.visitOuterClass(ownerTypeInternalName, methodName, methodDescriptor); }
String name = methodIndex == 0 ? null : readUTF8(cpInfoOffsets[methodIndex], charBuffer); String type = methodIndex == 0 ? null : readUTF8(cpInfoOffsets[methodIndex] + 2, charBuffer); classVisitor.visitOuterClass(className, name, type);
classVisitor.visitOuterClass(enclosingMethod.getDeclaringType().getInternalName(), enclosingMethod.getInternalName(), enclosingMethod.getDescriptor()); } else if (instrumentedType.isLocalType() || instrumentedType.isAnonymousType()) { classVisitor.visitOuterClass(instrumentedType.getEnclosingType().getInternalName(), NO_REFERENCE, NO_REFERENCE);