@Override
		public void visitEnd() {
			// Directly pass to the delegate so these do not get no-op'd
			MethodVisitor mv = getDelegate();
			if (mv == null) return;
			Type returnType = type.getReturnType();
			int sort = returnType.getSort();
			switch (sort) {
				case Type.VOID -> {
					// return;
					mv.visitInsn(RETURN);
				}
				case Type.BOOLEAN, Type.CHAR, Type.BYTE, Type.SHORT, Type.INT -> {
					// return false, '\0', 0
					mv.visitInsn(ICONST_0);
					mv.visitInsn(IRETURN);
				}
				case Type.FLOAT -> {
					// return 0.0f
					mv.visitInsn(FCONST_0);
					mv.visitInsn(FRETURN);
				}
				case Type.LONG -> {
					// return 0
					mv.visitInsn(LCONST_0);
					mv.visitInsn(LRETURN);
				}
				case Type.DOUBLE -> {
					// return 0.0
					mv.visitInsn(DCONST_0);
					mv.visitInsn(DRETURN);
				}
				case Type.ARRAY -> {
					// return new T[0]
					mv.visitInsn(ICONST_0);
					Type elementType = returnType.getElementType();
					int elementSort = elementType.getSort();
					switch (elementSort) {
						case Type.BOOLEAN -> mv.visitIntInsn(NEWARRAY, T_BOOLEAN);
						case Type.CHAR -> mv.visitIntInsn(NEWARRAY, T_CHAR);
						case Type.BYTE -> mv.visitIntInsn(NEWARRAY, T_BYTE);
						case Type.SHORT -> mv.visitIntInsn(NEWARRAY, T_SHORT);
						case Type.INT -> mv.visitIntInsn(NEWARRAY, T_INT);
						case Type.FLOAT -> mv.visitIntInsn(NEWARRAY, T_FLOAT);
						case Type.LONG -> mv.visitIntInsn(NEWARRAY, T_LONG);
						case Type.DOUBLE -> mv.visitIntInsn(NEWARRAY, T_DOUBLE);
						default -> mv.visitTypeInsn(ANEWARRAY, elementType.getInternalName());
					}
					mv.visitInsn(ARETURN);
				}
				default -> {
					// See if there's a specific kind of default value better than null.
					String className = returnType.getInternalName();
					Consumer<MethodVisitor> defaultValueProvider = OBJECT_DEFAULTS.get(className);
					if (defaultValueProvider != null) {
						defaultValueProvider.accept(mv);
					} else {
						mv.visitInsn(ACONST_NULL);
					}
					mv.visitInsn(ARETURN);
				}
			}
		}
Method visitor that replaces the contents with a no-op return.
recaf-core/src/main/java/software/coley/recaf/util/visitors/MethodNoopingVisitor.java