Class IRStatement
- java.lang.Object
-
- org.opendaylight.yangtools.yang.parser.rfc7950.ir.IRStatement
-
- All Implemented Interfaces:
Immutable
,MutationBehaviour<Immutable>
@Beta public abstract class IRStatement extends Object
A single YANG statement in its raw string form. A statement is composed of:- a mandatory keyword, modeled as
IRKeyword
- an optional argument, modeled as
IRArgument
- zero or more nested statements
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description @Nullable IRArgument
argument()
Return this statement's argument, if it is present.@NonNull IRKeyword
keyword()
Return this statement's keyword.abstract int
startColumn()
Return the column number on which this statement's keyword has its first character, counting from 0.abstract int
startLine()
Return the line number on which this statement's keyword has its first character, counting from 1.@NonNull List<? extends IRStatement>
statements()
Return this statement's substatements.String
toString()
-
-
-
Method Detail
-
keyword
public final @NonNull IRKeyword keyword()
Return this statement's keyword.- Returns:
- This statement's keyword.
-
argument
public final @Nullable IRArgument argument()
Return this statement's argument, if it is present.- Returns:
- This statement's argument, or null if this statement does not have an argument
-
statements
public @NonNull List<? extends IRStatement> statements()
Return this statement's substatements.- Returns:
- This statement's substatements.
-
startLine
public abstract int startLine()
Return the line number on which this statement's keyword has its first character, counting from 1. This information is used only for diagnostic purposes.- Returns:
- Line number where this statement started in the source code.
-
startColumn
public abstract int startColumn()
Return the column number on which this statement's keyword has its first character, counting from 0. This information is used only for diagnostic purposes.- Returns:
- Column number where this statement started in the source code.
-
-