<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class ConditionalExpression extends Expression { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( ConditionalExpression . class , "expression" , Expression . class , MANDATORY , CYCLE_RISK ) ; public static final ChildPropertyDescriptor THEN_EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( ConditionalExpression . class , "" , Expression . class , MANDATORY , CYCLE_RISK ) ; public static final ChildPropertyDescriptor ELSE_EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( ConditionalExpression . class , "" , Expression . class , MANDATORY , CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; static { List properyList = new ArrayList ( 4 ) ; createPropertyList ( ConditionalExpression . class , properyList ) ; addProperty ( EXPRESSION_PROPERTY , properyList ) ; addProperty ( THEN_EXPRESSION_PROPERTY , properyList ) ; addProperty ( ELSE_EXPRESSION_PROPERTY , properyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( properyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private Expression conditionExpression = null ; private Expression thenExpression = null ; private Expression elseExpression = null ; ConditionalExpression ( AST ast ) { super ( ast ) ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { if ( property == EXPRESSION_PROPERTY ) { if ( get ) { return getExpression ( ) ; } else { setExpression ( ( Expression ) child ) ; return null ; } } if ( property == THEN_EXPRESSION_PROPERTY ) { if ( get ) { return getThenExpression ( ) ; } else { setThenExpression ( ( Expression ) child ) ; return null ; } } if ( property == ELSE_EXPRESSION_PROPERTY ) { if ( get ) { return getElseExpression ( ) ; } else { setElseExpression ( ( Expression ) child ) ; return null ; } } return super . internalGetSetChildProperty ( property , get , child ) ; } final int getNodeType0 ( ) { return CONDITIONAL_EXPRESSION ; } ASTNode clone0 ( AST target ) { ConditionalExpression result = new ConditionalExpression ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setExpression ( ( Expression ) getExpression ( ) . clone ( target ) ) ; result . setThenExpression ( ( Expression ) getThenExpression ( ) . clone ( target ) ) ; result . setElseExpression ( ( Expression ) getElseExpression ( ) . clone ( target ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { return matcher . match ( this , other ) ; } void accept0 ( ASTVisitor visitor ) { boolean visitChildren = visitor . visit ( this ) ; if ( visitChildren ) { acceptChild ( visitor , getExpression ( ) ) ; acceptChild ( visitor , getThenExpression ( ) ) ; acceptChild ( visitor , getElseExpression ( ) ) ; } visitor . endVisit ( this ) ; } public Expression getExpression ( ) { if ( this . conditionExpression == null ) { synchronized ( this ) { if ( this . conditionExpression == null ) { preLazyInit ( ) ; this . conditionExpression = new SimpleName ( this . ast ) ; postLazyInit ( this . conditionExpression , EXPRESSION_PROPERTY ) ; } } } return this . conditionExpression ; } public void setExpression ( Expression expression ) { if ( expression == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . conditionExpression ; preReplaceChild ( oldChild , expression , EXPRESSION_PROPERTY ) ; this . conditionExpression = expression ; postReplaceChild ( oldChild , expression , EXPRESSION_PROPERTY ) ; } public Expression getThenExpression ( ) { if ( this . thenExpression == null ) { synchronized ( this ) { if ( this . thenExpression == null ) { preLazyInit ( ) ; this . thenExpression = new SimpleName ( this . ast ) ; postLazyInit ( this . thenExpression , THEN_EXPRESSION_PROPERTY ) ; } } } return this . thenExpression ; } public void setThenExpression ( Expression expression ) { if ( expression == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . thenExpression ; preReplaceChild ( oldChild , expression , THEN_EXPRESSION_PROPERTY ) ; this . thenExpression = expression ; postReplaceChild ( oldChild , expression , THEN_EXPRESSION_PROPERTY ) ; } public Expression getElseExpression ( ) { if ( this . elseExpression == null ) { synchronized ( this ) { if ( this . elseExpression == null ) { preLazyInit ( ) ; this . elseExpression = new SimpleName ( this . ast ) ; postLazyInit ( this . elseExpression , ELSE_EXPRESSION_PROPERTY ) ; } } } return this . elseExpression ; } public void setElseExpression ( Expression expression ) { if ( expression == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . elseExpression ; preReplaceChild ( oldChild , expression , ELSE_EXPRESSION_PROPERTY ) ; this . elseExpression = expression ; postReplaceChild ( oldChild , expression , ELSE_EXPRESSION_PROPERTY ) ; } int memSize ( ) { return BASE_NODE_SIZE + 3 * 4 ; } int treeSize ( ) { return memSize ( ) + ( this . conditionExpression == null ? 0 : getExpression ( ) . treeSize ( ) ) + ( this . thenExpression == null ? 0 : getThenExpression ( ) . treeSize ( ) ) + ( this . elseExpression == null ? 0 : getElseExpression ( ) . treeSize ( ) ) ; } } </s>