示例#1
0
  private MethodVisitor copyOriginalImplementationCode(int access, String desc) {
    if (isNative(access)) {
      generateEmptyImplementation(desc);
      return methodAnnotationsVisitor;
    }

    return new DynamicModifier();
  }
示例#2
0
  private boolean stubOutFinalizeMethod(int access, String name, String desc) {
    if ("finalize".equals(name) && "()V".equals(desc)) {
      mw = super.visitMethod(access, name, desc, null, null);
      generateEmptyImplementation();
      return true;
    }

    return false;
  }
示例#3
0
  private MethodVisitor stubOutClassInitializationIfApplicable(
      int access, boolean noFilters, boolean matchesFilters) {
    mw = super.visitMethod(access, "<clinit>", "()V", null, null);

    if (!noFilters && matchesFilters || noFilters && stubOutClassInitialization) {
      generateEmptyImplementation();
      return null;
    }

    return mw;
  }