* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.yangtools.yang.model.repo.api;
+package org.opendaylight.yangtools.yang.model.spi.source;
import static java.util.Objects.requireNonNull;
import com.google.common.io.ByteSource;
import java.io.IOException;
import java.io.InputStream;
-import java.util.Optional;
import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.concepts.Delegator;
+import org.opendaylight.yangtools.yang.model.api.source.SourceIdentifier;
-final class DelegatedYinTextSchemaSource extends YinTextSchemaSource implements Delegator<ByteSource> {
+final class DelegatedYinTextSource extends YinTextSource implements Delegator<ByteSource> {
private final @NonNull ByteSource delegate;
- DelegatedYinTextSchemaSource(final SourceIdentifier identifier, final ByteSource delegate) {
- super(identifier);
+ DelegatedYinTextSource(final SourceIdentifier sourceId, final ByteSource delegate) {
+ super(sourceId);
this.delegate = requireNonNull(delegate);
}
}
@Override
- public Optional<String> getSymbolicName() {
- return Optional.of("[" + delegate.toString() + "]");
+ public String symbolicName() {
+ return "[" + delegate.toString() + "]";
}
@Override