Class ImplicitSubstatement
- java.lang.Object
-
- org.opendaylight.yangtools.yang.parser.spi.source.StatementSourceReference
-
- org.opendaylight.yangtools.yang.parser.spi.source.ImplicitSubstatement
-
- All Implemented Interfaces:
Immutable
,MutationBehaviour<Immutable>
@Beta public final class ImplicitSubstatement extends StatementSourceReference
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DeclarationReference
declarationReference()
Returns theDeclarationReference
associated with this reference, if available.boolean
equals(Object obj)
int
hashCode()
static ImplicitSubstatement
of(StatementSourceReference parentRef)
Create a newImplicitSubstatement
.StatementOrigin
statementOrigin()
Returns theStatementOrigin
associated with this reference.String
toString()
Returns human readable representation of statement source.
-
-
-
Method Detail
-
of
public static ImplicitSubstatement of(StatementSourceReference parentRef)
Create a newImplicitSubstatement
.- Parameters:
parentRef
- Parent source reference- Returns:
- A new reference
- Throws:
NullPointerException
- if parentRef is null
-
statementOrigin
public StatementOrigin 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
public DeclarationReference declarationReference()
Description copied from class:StatementSourceReference
Returns theDeclarationReference
associated with this reference, if available.- Specified by:
declarationReference
in classStatementSourceReference
- Returns:
- A
DeclarationReference
or null.
-
toString
public String 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.
-
-