コード例 #1
0
 /** Returns the text of the conditional expression. */
 public String getExprText() {
   return exprUnion.getExprText();
 }
コード例 #2
0
 /** Returns a new {@link IfCondNode} built from this builder's state. */
 public IfCondNode build(ErrorReporter unusedForNow) {
   ExprUnion condition = ExprUnion.parseWithV1Fallback(commandText, sourceLocation);
   return new IfCondNode(id, sourceLocation, commandName, condition);
 }
コード例 #3
0
 /**
  * @param id The id for this node.
  * @param commandName The command name -- either 'if' or 'elseif'.
  * @param exprUnion Determines when the body is performed.
  */
 public IfCondNode(
     int id, SourceLocation sourceLocation, String commandName, ExprUnion exprUnion) {
   super(id, sourceLocation, commandName, exprUnion.getExprText());
   Preconditions.checkArgument(commandName.equals("if") || commandName.equals("elseif"));
   this.exprUnion = Preconditions.checkNotNull(exprUnion);
 }
コード例 #4
0
 @Override
 public String getCommandText() {
   return exprUnion.getExprText();
 }