1 /* 2 * @(#)IfTree.java 1.2 05/11/17 3 * 4 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 * 7 * Use and Distribution is subject to the Java Research License available 8 * at <http://wwws.sun.com/software/communitysource/jrl.html>. 9 */ 10 11 package com.sun.source.tree; 12 13 /** 14 * A tree node for an 'if' statement. 15 * 16 * For example: 17 * <pre> 18 * if ( <em>condition</em> ) 19 * <em>thenStatement</em> 20 * 21 * if ( <em>condition</em> ) 22 * <em>thenStatement</em> 23 * else 24 * <em>elseStatement</em> 25 * </pre> 26 * 27 * @see "The Java Language Specification, 3rd ed, section 14.9" 28 * 29 * @author Peter von der Ahé 30 * @author Jonathan Gibbons 31 * @since 1.6 32 */ 33 public interface IfTree extends StatementTree { 34 ExpressionTree getCondition(); 35 StatementTree getThenStatement(); 36 /** 37 * @return null if this if statement has no else branch. 38 */ 39 StatementTree getElseStatement(); 40 } 41