private static void findHtmlClassSignificantNodes(Set<String> names, AtomicReference<String> kind, Class<?> c) { if (c == null) return; if (java.lang.reflect.Modifier.isPublic(c.getModifiers())) { Matcher m = HTML_CLASS_SIGNIFICANT_NODE.matcher(c.getName()); if (m.matches()) { names.add(c.getSimpleName()); if (kind.get() == null) kind.set(c.getSimpleName()); } } findHtmlClassSignificantNodes(names, kind, c.getSuperclass()); for (Class<?> i : c.getInterfaces()) findHtmlClassSignificantNodes(names, kind, i); }
private static void findHtmlClassSignificantNodes(Set<String> names, AtomicReference<String> kind, Class<?> c) { if (c == null) return; if (java.lang.reflect.Modifier.isPublic(c.getModifiers())) { Matcher m = HTML_CLASS_SIGNIFICANT_NODE.matcher(c.getName()); if (m.matches()) { names.add(c.getSimpleName()); if (kind.get() == null) kind.set(c.getSimpleName()); } } findHtmlClassSignificantNodes(names, kind, c.getSuperclass()); for (Class<?> i : c.getInterfaces()) findHtmlClassSignificantNodes(names, kind, i); }
private static void findHtmlClassSignificantNodes(Set<String> names, AtomicReference<String> kind, Class<?> c) { if (c == null) return; if (java.lang.reflect.Modifier.isPublic(c.getModifiers())) { Matcher m = HTML_CLASS_SIGNIFICANT_NODE.matcher(c.getName()); if (m.matches()) { names.add(c.getSimpleName()); if (kind.get() == null) kind.set(c.getSimpleName()); } } findHtmlClassSignificantNodes(names, kind, c.getSuperclass()); for (Class<?> i : c.getInterfaces()) findHtmlClassSignificantNodes(names, kind, i); }
private void generateOpenTag(Node node, String tagName) { Set<String> classes = Sets.newHashSet(); AtomicReference<String> kind = new AtomicReference<String>(); findHtmlClassSignificantNodes(classes, kind, node == null ? null : node.getClass()); String description = node instanceof DescribedNode ? ((DescribedNode)node).getDescription() : null; sb.append("<").append(tagName); if (!classes.isEmpty()) { sb.append(" class=\""); Joiner.on(' ').appendTo(sb, classes); sb.append("\""); } if (nextElementName != null) { sb.append(" relation=\"").append(escapeHtml(nextElementName)).append("\""); nextElementName = null; } if (kind.get() != null) { sb.append(" kind=\"").append(escapeHtml(kind.get())).append("\""); } if (description != null) { sb.append(" description=\"").append(escapeHtml(description)).append("\""); } sb.append(">"); }
private void generateOpenTag(Node node, String tagName) { Set<String> classes = Sets.newHashSet(); AtomicReference<String> kind = new AtomicReference<String>(); findHtmlClassSignificantNodes(classes, kind, node == null ? null : node.getClass()); String description = node instanceof DescribedNode ? ((DescribedNode)node).getDescription() : null; sb.append("<").append(tagName); if (!classes.isEmpty()) { sb.append(" class=\""); Joiner.on(' ').appendTo(sb, classes); sb.append("\""); } if (nextElementName != null) { sb.append(" relation=\"").append(escapeHtml(nextElementName)).append("\""); nextElementName = null; } if (kind.get() != null) { sb.append(" kind=\"").append(escapeHtml(kind.get())).append("\""); } if (description != null) { sb.append(" description=\"").append(escapeHtml(description)).append("\""); } sb.append(">"); }
private void generateOpenTag(Node node, String tagName) { Set<String> classes = Sets.newHashSet(); AtomicReference<String> kind = new AtomicReference<String>(); findHtmlClassSignificantNodes(classes, kind, node == null ? null : node.getClass()); String description = node instanceof DescribedNode ? ((DescribedNode)node).getDescription() : null; sb.append("<").append(tagName); if (!classes.isEmpty()) { sb.append(" class=\""); Joiner.on(' ').appendTo(sb, classes); sb.append("\""); } if (nextElementName != null) { sb.append(" relation=\"").append(escapeHtml(nextElementName)).append("\""); nextElementName = null; } if (kind.get() != null) { sb.append(" kind=\"").append(escapeHtml(kind.get())).append("\""); } if (description != null) { sb.append(" description=\"").append(escapeHtml(description)).append("\""); } sb.append(">"); }