import static java.util.Objects.requireNonNull;
-import com.google.common.annotations.Beta;
import com.google.common.base.MoreObjects.ToStringHelper;
import java.io.IOException;
import java.io.InputStream;
/**
* A resource-backed {@link YinTextSchemaSource}.
*/
-@Beta
-// FIXME: YANGTOOLS-849: 3.0.0: hide this class
-public final class ResourceYangTextSchemaSource extends YangTextSchemaSource implements Delegator<URL> {
+final class ResourceYangTextSchemaSource extends YangTextSchemaSource implements Delegator<URL> {
private final @NonNull URL url;
ResourceYangTextSchemaSource(final SourceIdentifier identifier, final URL url) {
import org.opendaylight.yangtools.yang.common.Revision;
/**
- * YANG text schema source representation. Exposes an RFC6020 or RFC7950 text representation
- * as an {@link InputStream}.
+ * YANG text schema source representation. Exposes an RFC6020 or RFC7950 text representation as an {@link InputStream}.
*/
@Beta
public abstract class YangTextSchemaSource extends ByteSource implements YangSchemaSourceRepresentation {
* @return A new instance.
* @throws IllegalArgumentException if the resource does not exist or if the name has invalid format
*/
- // FIXME: 3.0.0: YANGTOOLS-849: return YangTextSchemaSource
- public static @NonNull ResourceYangTextSchemaSource forResource(final String resourceName) {
+ public static @NonNull YangTextSchemaSource forResource(final String resourceName) {
return forResource(YangTextSchemaSource.class, resourceName);
}
* @return A new instance.
* @throws IllegalArgumentException if the resource does not exist or if the name has invalid format
*/
- // FIXME: 3.0.0: YANGTOOLS-849: return YangTextSchemaSource
- public static @NonNull ResourceYangTextSchemaSource forResource(final Class<?> clazz, final String resourceName) {
+ public static @NonNull YangTextSchemaSource forResource(final Class<?> clazz, final String resourceName) {
final String fileName = resourceName.substring(resourceName.lastIndexOf('/') + 1);
final SourceIdentifier identifier = identifierFromFilename(fileName);
final URL url = Resources.getResource(clazz, resourceName);