public static void stubTreeToBuffer(final Stub node, final Appendable buffer, final int indent) { StringUtil.repeatSymbol(buffer, ' ', indent); try { final ObjectStubSerializer stubType = node.getStubType(); if (stubType != null) { buffer.append(stubType.toString()).append(':'); } buffer.append(node.toString()).append('\n'); @SuppressWarnings({"unchecked"}) final List<? extends Stub> children = node.getChildrenStubs(); for (final Stub child : children) { stubTreeToBuffer(child, buffer, indent + 2); } } catch (IOException e) { LOG.error(e); } }
@Override public ObjectStubSerializer getStubType() { return AttributeStubSerializer.INSTANCE; }
@Override public ObjectStubSerializer getStubType() { return FileStubSerializer.INSTANCE; }
@Override public ObjectStubSerializer getStubType() { return ElementStubSerializer.INSTANCE; }