Class ImplicitSubstatement
- java.lang.Object
-
- org.opendaylight.yangtools.yang.parser.spi.source.ImplicitSubstatement
-
- All Implemented Interfaces:
StatementSourceReference
@Beta public final class ImplicitSubstatement extends Object implements StatementSourceReference
An implicit sub-statement, which is implied to be always present in its parent, even if it does not appear in model source.- Author:
- Robert Varga
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
StatementSource
getStatementSource()
Returns source type.int
hashCode()
static ImplicitSubstatement
of(StatementSourceReference parentRef)
Create a newImplicitSubstatement
.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
-
getStatementSource
public StatementSource getStatementSource()
Description copied from interface:StatementSourceReference
Returns source type.- Specified by:
getStatementSource
in interfaceStatementSourceReference
- Returns:
StatementSource.DECLARATION
if statement was explicitly declared in YANG model source,StatementSource.CONTEXT
if statement was inferred.
-
toString
public String toString()
Description copied from interface: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 interfaceStatementSourceReference
- Overrides:
toString
in classObject
- Returns:
- human readable representation of statement source.
-
-