@Beta public abstract class YinTextSchemaSource extends com.google.common.io.ByteSource implements YinSchemaSourceRepresentation
InputStream
.Modifier | Constructor and Description |
---|---|
protected |
YinTextSchemaSource(SourceIdentifier identifier) |
Modifier and Type | Method and Description |
---|---|
protected abstract com.google.common.base.MoreObjects.ToStringHelper |
addToStringAttributes(@NonNull com.google.common.base.MoreObjects.ToStringHelper toStringHelper)
Add subclass-specific attributes to the output
toString() output. |
static @NonNull YinTextSchemaSource |
delegateForByteSource(SourceIdentifier identifier,
com.google.common.io.ByteSource delegate)
Create a new YinTextSchemaSource with a specific source identifier and backed
by ByteSource, which provides the actual InputStreams.
|
static @NonNull YinTextSchemaSource |
forFile(File file) |
static @NonNull YinTextSchemaSource |
forResource(Class<?> clazz,
String resourceName) |
SourceIdentifier |
getIdentifier()
Return this objects Identifier.
|
Class<? extends YinTextSchemaSource> |
getType()
Return the concrete representation type.
|
static @NonNull SourceIdentifier |
identifierFromFilename(String name) |
String |
toString() |
asCharSource, concat, concat, concat, contentEquals, copyTo, copyTo, empty, hash, isEmpty, openBufferedStream, openStream, read, read, size, sizeIfKnown, slice, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSymbolicName
protected YinTextSchemaSource(SourceIdentifier identifier)
public static @NonNull SourceIdentifier identifierFromFilename(String name)
public final SourceIdentifier getIdentifier()
Identifiable
getIdentifier
in interface Identifiable<SourceIdentifier>
getIdentifier
in interface SchemaSourceRepresentation
public Class<? extends YinTextSchemaSource> getType()
SchemaSourceRepresentation
getType
in interface SchemaSourceRepresentation
getType
in interface YinSchemaSourceRepresentation
protected abstract com.google.common.base.MoreObjects.ToStringHelper addToStringAttributes(@NonNull com.google.common.base.MoreObjects.ToStringHelper toStringHelper)
toString()
output. Since
subclasses are prevented from overriding toString()
for consistency
reasons, they can add their specific attributes to the resulting string by attaching
attributes to the supplied MoreObjects.ToStringHelper
.toStringHelper
- ToStringHelper onto the attributes can be addedpublic static @NonNull YinTextSchemaSource delegateForByteSource(SourceIdentifier identifier, com.google.common.io.ByteSource delegate)
identifier
- SourceIdentifier of the resulting schema sourcedelegate
- Backing ByteSource instancepublic static @NonNull YinTextSchemaSource forFile(File file)
public static @NonNull YinTextSchemaSource forResource(Class<?> clazz, String resourceName)
Copyright © 2019 OpenDaylight. All rights reserved.