* 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.CharSource;
import java.io.IOException;
import java.io.Reader;
-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 DelegatedYangTextSchemaSource extends YangTextSchemaSource implements Delegator<CharSource> {
+final class DelegatedYangTextSource extends YangTextSource implements Delegator<CharSource> {
private final @NonNull CharSource delegate;
- DelegatedYangTextSchemaSource(final SourceIdentifier identifier, final CharSource delegate) {
- super(identifier);
+ DelegatedYangTextSource(final SourceIdentifier sourceId, final CharSource delegate) {
+ super(sourceId);
this.delegate = requireNonNull(delegate);
}
}
@Override
- public Optional<String> getSymbolicName() {
- return Optional.of("[" + delegate.toString() + "]");
+ public String symbolicName() {
+ return "[" + delegate.toString() + "]";
}
@Override