Class IRStatement
java.lang.Object
org.opendaylight.yangtools.yang.ir.IRStatement
- All Implemented Interfaces:
Immutable
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
Modifier and TypeMethodDescriptionfinal @Nullable IRArgument
argument()
Return this statement's argument, if it is present.final boolean
final int
hashCode()
final @NonNull IRKeyword
keyword()
Return this statement's keyword.static @NonNull IRStatement
of
(IRKeyword keyword, IRArgument argument, int line, int column, ImmutableList<IRStatement> statements) abstract int
Return the column number on which this statement's keyword has its first character, counting from 0.abstract int
Return the line number on which this statement's keyword has its first character, counting from 1.@NonNull List
<? extends IRStatement> Return this statement's substatements.final String
toString()
-
Method Details
-
of
public static @NonNull IRStatement of(IRKeyword keyword, IRArgument argument, int line, int column, ImmutableList<IRStatement> statements) -
keyword
Return this statement's keyword.- Returns:
- This statement's keyword.
-
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
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.
-
hashCode
public final int hashCode() -
equals
-
toString
-