Class StatementSourceReference
java.lang.Object
org.opendaylight.yangtools.yang.parser.spi.source.StatementSourceReference
- All Implemented Interfaces:
Immutable
- Direct Known Subclasses:
ExplicitStatement,ImplicitSubstatement
Reference of statement source. Statement source reference serves to provide information, why a statement was defined
and introduced in model.
Reasons for introduction of statement could be various, but most obvious one is explicit declaration in model source
text such as ExplicitStatement.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract @Nullable org.opendaylight.yangtools.yang.model.api.meta.DeclarationReferenceReturns theDeclarationReferenceassociated with this reference, if available.abstract @NonNull org.opendaylight.yangtools.yang.model.api.meta.StatementOriginReturns theStatementOriginassociated with this reference.abstract @NonNull StringtoString()Returns human readable representation of statement source.
-
Constructor Details
-
StatementSourceReference
public StatementSourceReference()
-
-
Method Details
-
statementOrigin
public abstract @NonNull org.opendaylight.yangtools.yang.model.api.meta.StatementOrigin statementOrigin()Returns theStatementOriginassociated with this reference.- Returns:
StatementOrigin.DECLARATIONif statement was explicitly declared in YANG model source,StatementOrigin.CONTEXTif statement was inferred.
-
declarationReference
public abstract @Nullable org.opendaylight.yangtools.yang.model.api.meta.DeclarationReference declarationReference()Returns theDeclarationReferenceassociated with this reference, if available.- Returns:
- A
DeclarationReferenceor null.
-
toString
Returns human readable representation of statement source.Implementations of this interface should override
toString(), since it may be used in error reporting to provide context information for model designer to debug errors in its mode.
-