@Nonnull
			@Override
			public String filter(@Nonnull Workspace workspace, @Nonnull ClassInfo classInfo, @Nonnull String code) {
				int codeLength = code.length();
				int keyLength = KEY.length();
				int i = codeLength;

				// Get class comments container if it exists.
				ClassPathNode classPath = workspace.findClass(classInfo.getName());
				if (classPath == null)
					return code;
				WorkspaceComments comments = persistMap.get(CommentKey.workspaceInput(workspace));
				if (comments == null)
					return code;
				ClassComments classComments = comments.getClassComments(classPath);
				if (classComments == null)
					return code;

				do {
					int commentIndex = code.lastIndexOf(KEY, i);
					if (commentIndex < 0)
						break;
					i = commentIndex - 1; // Move backwards

					// Extract path key text from annotation name.
					int keyValueStart = commentIndex + keyLength;
					int endWorkspaceKey = Math.min(codeLength, keyValueStart + 8);
					int endPathKey = Math.min(codeLength, keyValueStart + 17);
					String pathKeyText = code.substring(endWorkspaceKey + 1, endPathKey);
					try {
						// The values are integer hashCodes converted to unsigned hex.
						// Casting back will put em back to the expected value.
						//  Initial hash: -1845811502
						//  Unsigned:      2449155794 (out of int bounds)
						//  Casting will return to the original value.
						int pathKey = (int) Long.parseLong(pathKeyText, 16);

						// Lookup what path in the class correlates to the path-key.
						String comment = null;
						int pathHash = CommentKey.hashPath(classPath);
						if (pathHash == pathKey) {
							comment = classComments.getClassComment();
						} else {
							for (FieldMember field : classInfo.getFields()) {
								pathHash = CommentKey.hashPath(classPath.child(field));
								if (pathHash == pathKey) {
									comment = classComments.getFieldComment(field);
									break;
								}
							}
							if (comment == null) {
								for (MethodMember method : classInfo.getMethods()) {
									pathHash = CommentKey.hashPath(classPath.child(method));
									if (pathHash == pathKey) {
										comment = classComments.getMethodComment(method);
										break;
									}
								}
							}
						}

						// Replace the annotation.
						String replacement;
						if (comment == null) {
							replacement = "";
						} else {
							int wordWrapLimit = config.getWordWrappingLimit().getValue();
							if (comment.length() > wordWrapLimit)
								comment = StringUtil.wordWrap(comment, wordWrapLimit);

							if (comment.contains("\n")) {
								// The calculated indent includes the '\n' so we can just for-each the comment lines and prefix it.
								String indent = code.substring(Math.max(0, code.lastIndexOf("\n", commentIndex)), commentIndex);
								StringBuilder sb = new StringBuilder("/**");
								comment.lines().forEach(line -> sb.append(indent).append(" * ").append(line));
								sb.append(indent).append(" */");
								replacement = sb.toString();
							} else {
								replacement = "/** " + comment + " */";
							}
						}
						code = StringUtil.replaceRange(code, commentIndex, commentIndex + 31, replacement);
					} catch (NumberFormatException ignored) {
						// Bogus anno
					}
				} while (true);
				return code;
			}
Map of workspace comment impls modeling only data. Used for persistence.
recaf-core/src/main/java/software/coley/recaf/services/comment/CommentManager.java