Class DelegatedYangTextSource
java.lang.Object
com.google.common.io.CharSource
org.opendaylight.yangtools.yang.model.api.source.YangTextSource
org.opendaylight.yangtools.yang.model.spi.source.DelegatedYangTextSource
- All Implemented Interfaces:
Delegator<CharSource>
,Immutable
,SourceRepresentation
,YangSourceRepresentation
A
YangTextSource
delegating to a CharSource
.-
Constructor Summary
ConstructorsConstructorDescriptionDelegatedYangTextSource
(SourceIdentifier sourceId, CharSource delegate) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected MoreObjects.ToStringHelper
addToStringAttributes
(MoreObjects.ToStringHelper toStringHelper) Add subclass-specific attributes to the outputYangTextSource.toString()
output.final CharSource
Return underlying delegate.final Reader
final SourceIdentifier
sourceId()
TheSourceIdentifier
of this source.final @NonNull String
Return the symbolic name, if available.Methods inherited from class org.opendaylight.yangtools.yang.model.api.source.YangTextSource
getType, toString
Methods inherited from class com.google.common.io.CharSource
asByteSource, concat, concat, concat, copyTo, copyTo, empty, forEachLine, isEmpty, length, lengthIfKnown, lines, openBufferedStream, read, readFirstLine, readLines, readLines, wrap
-
Constructor Details
-
DelegatedYangTextSource
Default constructor.- Parameters:
sourceId
-SourceIdentifier
of the resulting schema sourcedelegate
- BackingCharSource
instance
-
-
Method Details
-
openStream
- Specified by:
openStream
in classCharSource
- Throws:
IOException
-
symbolicName
Description copied from interface:SourceRepresentation
Return the symbolic name, if available. This name has no semantic meaning beyond being useful for debugging by humans.- Returns:
- Symbolic name, if available
-
addToStringAttributes
protected MoreObjects.ToStringHelper addToStringAttributes(MoreObjects.ToStringHelper toStringHelper) Description copied from class:YangTextSource
Add subclass-specific attributes to the outputYangTextSource.toString()
output. Since subclasses are prevented from overridingYangTextSource.toString()
for consistency reasons, they can add their specific attributes to the resulting string by attaching attributes to the suppliedMoreObjects.ToStringHelper
.- Overrides:
addToStringAttributes
in classYangTextSource
- Parameters:
toStringHelper
- ToStringHelper onto the attributes can be added- Returns:
- ToStringHelper supplied as input argument.
-
sourceId
Description copied from interface:SourceRepresentation
TheSourceIdentifier
of this source.- Specified by:
sourceId
in interfaceSourceRepresentation
- Returns:
SourceIdentifier
of this source
-
getDelegate
Description copied from interface:Delegator
Return underlying delegate.- Specified by:
getDelegate
in interfaceDelegator<T>
- Returns:
- underlying delegate.
-