import static org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findDataSchemaNode;
import static org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findNodeInSchemaContext;
import static org.opendaylight.yangtools.yang.model.util.SchemaContextUtil.findParentModule;
-
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
final String basePackageName = BindingMapping.getRootPackageName(module.getQNameModule());
final GeneratedTypeBuilder interfaceBuilder = moduleTypeBuilder(module, "Service");
interfaceBuilder.addImplementsType(Types.typeForClass(RpcService.class));
- interfaceBuilder.setDescription(createDescription(rpcDefinitions, module.getName(), module.getModuleSourcePath()));
+ interfaceBuilder.setDescription(createDescription(rpcDefinitions, module.getName()));
for (final RpcDefinition rpc : rpcDefinitions) {
if (rpc != null) {
.setComment(encodeAngleBrackets(notification.getDescription())).setReturnType(Types.VOID);
}
}
- listenerInterface.setDescription(createDescription(notifications, module.getName(), module.getModuleSourcePath()));
+ listenerInterface.setDescription(createDescription(notifications, module.getName()));
genCtx.get(module).addTopLevelNodeType(listenerInterface);
}
return returnType;
}
- private static TypeDefinition<?> getBaseOrDeclaredType(TypeDefinition<?> typeDef) {
+ private static TypeDefinition<?> getBaseOrDeclaredType(final TypeDefinition<?> typeDef) {
if (typeDef instanceof ExtendedType) {
// Legacy behaviour returning ExtendedType is enough
return typeDef;
return list == null || list.isEmpty();
}
- private String createDescription(final Set<? extends SchemaNode> schemaNodes, final String moduleName, final String moduleSourcePath) {
+ private String createDescription(final Set<? extends SchemaNode> schemaNodes, final String moduleName) {
final StringBuilder sb = new StringBuilder();
if (!isNullOrEmpty(schemaNodes)) {
}
}
sb.append(NEW_LINE);
- sb.append("<br>(Source path: <i>");
- sb.append(moduleSourcePath);
- sb.append("</i>):");
- sb.append(NEW_LINE);
if (verboseClassComments) {
sb.append("<pre>");
sb.append(module.getName());
sb.append("</b>");
sb.append(NEW_LINE);
- sb.append("<br>(Source path: <i>");
- sb.append(module.getModuleSourcePath());
- sb.append("</i>):");
- sb.append(NEW_LINE);
sb.append("<pre>");
sb.append(NEW_LINE);
sb.append(encodeAngleBrackets(YangTemplate.generateYangSnipet(schemaNode)));
sb.append(module.getName());
sb.append("</b>");
sb.append(NEW_LINE);
- sb.append("<br>Source path: <i>");
- sb.append(module.getModuleSourcePath());
- sb.append("</i>):");
- sb.append(NEW_LINE);
sb.append("<pre>");
sb.append(NEW_LINE);
sb.append(encodeAngleBrackets(YangTemplate.generateYangSnipet(module)));
return ret.isEmpty() ? "" : ret;
}
- private void annotateDeprecatedIfNecessary(Status status, GeneratedTypeBuilder builder) {
+ private static void annotateDeprecatedIfNecessary(final Status status, final GeneratedTypeBuilder builder) {
if (status == Status.DEPRECATED) {
builder.addAnnotation("", "Deprecated");
}