import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
-public class SchemaContextProviders {
+public final class SchemaContextProviders {
- public static final SchemaContextProvider fromSchemaService(final SchemaService schemaService) {
+ private SchemaContextProviders() {
+ throw new UnsupportedOperationException("Utility class.");
+ }
+
+ public static SchemaContextProvider fromSchemaService(final SchemaService schemaService) {
if (schemaService instanceof SchemaContextProvider) {
return (SchemaContextProvider) schemaService;
}
return new SchemaServiceAdapter(schemaService);
}
- private final static class SchemaServiceAdapter implements SchemaContextProvider, Delegator<SchemaService> {
+ private static final class SchemaServiceAdapter implements SchemaContextProvider, Delegator<SchemaService> {
private final SchemaService service;
- public SchemaServiceAdapter(final SchemaService service) {
- super();
+ SchemaServiceAdapter(final SchemaService service) {
this.service = service;
}