2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/eplv10.html
8 package org.opendaylight.yangtools.yang.model.repo.util;
10 import com.google.common.base.Preconditions;
12 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
13 import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation;
14 import org.opendaylight.yangtools.yang.model.repo.spi.PotentialSchemaSource;
15 import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceProvider;
16 import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceRegistration;
18 public abstract class AbstractSchemaSourceRegistration<T extends SchemaSourceRepresentation> extends AbstractObjectRegistration<PotentialSchemaSource<T>> implements SchemaSourceRegistration<T> {
19 private final SchemaSourceProvider<?> provider;
21 protected AbstractSchemaSourceRegistration(final SchemaSourceProvider<?> provider, final PotentialSchemaSource<T> source) {
23 this.provider = Preconditions.checkNotNull(provider);
26 protected final SchemaSourceProvider<?> getProvider() {