@Override public Optional<String> getDescription() { return schemaNode.getDescription(); }
@Override public Optional<String> getDescription() { return schemaNode.getDescription(); }
@Override void addCodegenInformation(final GeneratedTypeBuilderBase<?> genType, final Module module, final SchemaNode node) { YangSourceDefinition.of(module, node).ifPresent(genType::setYangSourceDefinition); TypeComments.description(node).ifPresent(genType::addComment); node.getDescription().ifPresent(genType::setDescription); node.getReference().ifPresent(genType::setReference); }
private String createDescription(final SchemaNode schemaNode, final String fullyQualifiedName) { final StringBuilder sb = new StringBuilder(); final String formattedDescription = YangTemplate.formatToParagraph(schemaNode.getDescription(), 0);
final Module module = findParentModule(schemaContext, schemaNode); qnameConstant(newType, BindingMapping.QNAME_STATIC_FIELD_NAME, schemaNode.getQName()); newType.addComment(schemaNode.getDescription()); newType.setDescription(createDescription(schemaNode, newType.getFullyQualifiedName())); newType.setReference(schemaNode.getReference());