MCPcopy Create free account
hub / github.com/FabricMC/Matcher / escape

Method escape

src/main/java/matcher/gui/tab/HtmlTextifier.java:1944–1958  ·  view source on GitHub ↗
(Object o)

Source from the content-addressed store, hash-verified

1942 }
1943
1944 @SuppressWarnings("unchecked")
1945 private static Object escape(Object o) {
1946 if (o instanceof List) {
1947 for (ListIterator<Object> it = ((List<Object>) o).listIterator(); it.hasNext(); ) {
1948 it.set(escape(it.next()));
1949 }
1950 } else if (o instanceof String) {
1951 String str = (String) o;
1952 o = HtmlUtil.escape(str, "div", "span");
1953 } else {
1954 throw new IllegalStateException("unexpected object type: "+o.getClass());
1955 }
1956
1957 return o;
1958 }
1959
1960 /**
1961 * The type of internal names (see {@link Type#getInternalName()}). See {@link #appendDescriptor}.

Callers 1

visitClassEndMethod · 0.95

Calls 5

escapeMethod · 0.95
hasNextMethod · 0.80
setMethod · 0.80
getClassMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected