<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class ForStatement extends Statement { public static final ChildListPropertyDescriptor INITIALIZERS_PROPERTY = new ChildListPropertyDescriptor ( ForStatement . class , "initializers" , Expression . class , CYCLE_RISK ) ; public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( ForStatement . class , "expression" , Expression . class , OPTIONAL , CYCLE_RISK ) ; public static final ChildListPropertyDescriptor UPDATERS_PROPERTY = new ChildListPropertyDescriptor ( ForStatement . class , "updaters" , Expression . class , CYCLE_RISK ) ; public static final ChildPropertyDescriptor BODY_PROPERTY = new ChildPropertyDescriptor ( ForStatement . class , "body" , Statement . class , MANDATORY , CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; static { List properyList = new ArrayList ( 5 ) ; createPropertyList ( ForStatement . class , properyList ) ; addProperty ( INITIALIZERS_PROPERTY , properyList ) ; addProperty ( EXPRESSION_PROPERTY , properyList ) ; addProperty ( UPDATERS_PROPERTY , properyList ) ; addProperty ( BODY_PROPERTY , properyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( properyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private ASTNode . NodeList initializers = new ASTNode . NodeList ( INITIALIZERS_PROPERTY ) ; private Expression optionalConditionExpression = null ; private ASTNode . NodeList updaters = new ASTNode . NodeList ( UPDATERS_PROPERTY ) ; private Statement body = null ; ForStatement ( 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 == BODY_PROPERTY ) { if ( get ) { return getBody ( ) ; } else { setBody ( ( Statement ) child ) ; return null ; } } return super . internalGetSetChildProperty ( property , get , child ) ; } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { if ( property == INITIALIZERS_PROPERTY ) { return initializers ( ) ; } if ( property == UPDATERS_PROPERTY ) { return updaters ( ) ; } return super . internalGetChildListProperty ( property ) ; } final int getNodeType0 ( ) { return FOR_STATEMENT ; } ASTNode clone0 ( AST target ) { ForStatement result = new ForStatement ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . copyLeadingComment ( this ) ; result . initializers ( ) . addAll ( ASTNode . copySubtrees ( target , initializers ( ) ) ) ; result . setExpression ( ( Expression ) ASTNode . copySubtree ( target , getExpression ( ) ) ) ; result . updaters ( ) . addAll ( ASTNode . copySubtrees ( target , updaters ( ) ) ) ; result . setBody ( ( Statement ) ASTNode . copySubtree ( target , getBody ( ) ) ) ; 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 ) { acceptChildren ( visitor , this . initializers ) ; acceptChild ( visitor , getExpression ( ) ) ; acceptChildren ( visitor , this . updaters ) ; acceptChild ( visitor , getBody ( ) ) ; } visitor . endVisit ( this ) ; } public List initializers ( ) { return this . initializers ; } public Expression getExpression ( ) { return this . optionalConditionExpression ; } public void setExpression ( Expression expression ) { ASTNode oldChild = this . optionalConditionExpression ; preReplaceChild ( oldChild , expression , EXPRESSION_PROPERTY ) ; this . optionalConditionExpression = expression ; postReplaceChild ( oldChild , expression , EXPRESSION_PROPERTY ) ; } public List updaters ( ) { return this . updaters ; } public Statement getBody ( ) { if ( this . body == null ) { synchronized ( this ) { if ( this . body == null ) { preLazyInit ( ) ; this . body = new Block ( this . ast ) ; postLazyInit ( this . body , BODY_PROPERTY ) ; } } } return this . body ; } public void setBody ( Statement statement ) { if ( statement == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . body ; preReplaceChild ( oldChild , statement , BODY_PROPERTY ) ; this . body = statement ; postReplaceChild ( oldChild , statement , BODY_PROPERTY ) ; } int memSize ( ) { return super . memSize ( ) + 4 * 4 ; } int treeSize ( ) { return memSize ( ) + this . initializers . listSize ( ) + this . updaters . listSize ( ) + ( this . optionalConditionExpression == null ? 0 : getExpression ( ) . treeSize ( ) ) + ( this . body == null ? 0 : getBody ( ) . treeSize ( ) ) ; } } </s>