public void immediateDeleteAnnotations(@Nonnull ClassBundle<? extends ClassInfo> bundle,
	                                       @Nonnull Annotated annotated,
	                                       @Nonnull Collection<String> annotationTypes) {
		try {
			if (annotated instanceof JvmClassInfo target) {
				ClassReader reader = target.getClassReader();
				ClassWriter writer = new ClassWriter(reader, 0);
				reader.accept(new ClassAnnotationRemovingVisitor(writer, annotationTypes), 0);
				JvmClassInfo updatedClass = new JvmClassInfoBuilder(writer.toByteArray()).build();
				bundle.put(cast(updatedClass));
			} else if (annotated instanceof ClassMember member && member.getDeclaringClass() instanceof JvmClassInfo target) {
				ClassReader reader = target.getClassReader();
				ClassWriter writer = new ClassWriter(reader, 0);
				if (member.isField()) {
					FieldMember field = (FieldMember) member;
					reader.accept(FieldAnnotationRemovingVisitor.forClass(writer, annotationTypes, field), 0);
				} else {
					MethodMember method = (MethodMember) member;
					reader.accept(MethodAnnotationRemovingVisitor.forClass(writer, annotationTypes, method), 0);
				}
				JvmClassInfo updatedClass = new JvmClassInfoBuilder(writer.toByteArray()).build();
				bundle.put(cast(updatedClass));
			} else {
				logger.warn("Cannot remove annotations on unsupported annotated type: {}", annotated.getClass().getSimpleName());
			}
		} catch (Throwable t) {
			logger.error("Failed removing annotation", t);
		}
	}
@param bundle
		Containing bundle.
@param annotated
		Annotated class or member.
@param annotationTypes
		Annotation types to remove.
recaf-ui/src/main/java/software/coley/recaf/services/navigation/Actions.java