Class ImplicitSubstatement
java.lang.Object
org.opendaylight.yangtools.yang.model.api.meta.StatementSourceReference
org.opendaylight.yangtools.yang.parser.spi.source.ImplicitSubstatement
- All Implemented Interfaces:
Immutable
An implicit sub-statement, which is implied to be always present in its parent, even if it does not appear in model
source.
-
Method Summary
Modifier and TypeMethodDescriptionReturns theDeclarationReference
associated with this reference, if available.boolean
int
hashCode()
static ImplicitSubstatement
of
(StatementSourceReference parentRef) Create a newImplicitSubstatement
.Returns theStatementOrigin
associated with this reference.toString()
Returns human readable representation of statement source.
-
Method Details
-
of
Create a newImplicitSubstatement
.- Parameters:
parentRef
- Parent source reference- Returns:
- A new reference
- Throws:
NullPointerException
- if parentRef is null
-
statementOrigin
Description copied from class:StatementSourceReference
Returns theStatementOrigin
associated with this reference.- Specified by:
statementOrigin
in classStatementSourceReference
- Returns:
StatementOrigin.DECLARATION
if statement was explicitly declared in YANG model source,StatementOrigin.CONTEXT
if statement was inferred.
-
declarationReference
Description copied from class:StatementSourceReference
Returns theDeclarationReference
associated with this reference, if available.- Specified by:
declarationReference
in classStatementSourceReference
- Returns:
- A
DeclarationReference
or null.
-
hashCode
public int hashCode() -
equals
-
toString
Description copied from class:StatementSourceReference
Returns human readable representation of statement source.Implementations of this interface should override
StatementSourceReference.toString()
, since it may be used in error reporting to provide context information for model designer to debug errors in its mode.- Specified by:
toString
in classStatementSourceReference
- Returns:
- human readable representation of statement source.
-