Skip navigation links 
 
javax.ide.model.java.source.tree
Interface AssertStatementT
- All Superinterfaces:
 
- BlockElementT, SimpleStatementT, StatementT, Tree
 
- 
public interface AssertStatementT
 
- extends SimpleStatementT
 
An assert statement. JLS3 14.10. An assert statement has a conditional expression and an optional detail message expression. Here are some examples:
   assert enabled == true;
   assert(enabled == true);
   assert enabled == true: "Not enabled";
 
If there is a second expression and the condition evaluates to false, then the second expression is evaluated and then converted to a String used to create a new AssertionError.
 
 
  
 
 
 
 
| Methods inherited from interface javax.ide.model.java.source.tree.Tree | 
accept, addSelf, addSelf, addSelfAfter, addSelfBefore, clearProperty, cloneSelf, getChildren, getOwningFile, getParent, getPosition, getProperty, getSiblingAfter, getSiblingBefore, getSiblings, getTreeKind, isSynthetic, removeSelf, replaceSelf, setProperty | 
 
 
getOutputExpression
ExpressionT getOutputExpression()
- Valid for "assert" statements. Syntax is "assert boolean-expr: output-expr;".
 
- 
- Returns:
 
- the output expression. Null if none was declared or if this is not an assert statement.
 
 
Skip navigation links 
 
Copyright © 1997, 2012, Oracle. All rights reserved.