<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class TryStatement extends Statement { public static final ChildPropertyDescriptor BODY_PROPERTY = new ChildPropertyDescriptor ( TryStatement . class , "body" , Block . class , MANDATORY , CYCLE_RISK ) ; public static final ChildListPropertyDescriptor CATCH_CLAUSES_PROPERTY = new ChildListPropertyDescriptor ( TryStatement . class , "catchClauses" , CatchClause . class , CYCLE_RISK ) ; public static final ChildPropertyDescriptor FINALLY_PROPERTY = new ChildPropertyDescriptor ( TryStatement . class , "finally" , Block . class , OPTIONAL , CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; static { List propertyList = new ArrayList ( 4 ) ; createPropertyList ( TryStatement . class , propertyList ) ; addProperty ( BODY_PROPERTY , propertyList ) ; addProperty ( CATCH_CLAUSES_PROPERTY , propertyList ) ; addProperty ( FINALLY_PROPERTY , propertyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( propertyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private Block body = null ; private ASTNode . NodeList catchClauses = new ASTNode . NodeList ( CATCH_CLAUSES_PROPERTY ) ; private Block optionalFinallyBody = null ; TryStatement ( AST ast ) { super ( ast ) ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { if ( property == BODY_PROPERTY ) { if ( get ) { return getBody ( ) ; } else { setBody ( ( Block ) child ) ; return null ; } } if ( property == FINALLY_PROPERTY ) { if ( get ) { return getFinally ( ) ; } else { setFinally ( ( Block ) child ) ; return null ; } } return super . internalGetSetChildProperty ( property , get , child ) ; } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { if ( property == CATCH_CLAUSES_PROPERTY ) { return catchClauses ( ) ; } return super . internalGetChildListProperty ( property ) ; } final int getNodeType0 ( ) { return TRY_STATEMENT ; } ASTNode clone0 ( AST target ) { TryStatement result = new TryStatement ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . copyLeadingComment ( this ) ; result . setBody ( ( Block ) getBody ( ) . clone ( target ) ) ; result . catchClauses ( ) . addAll ( ASTNode . copySubtrees ( target , catchClauses ( ) ) ) ; result . setFinally ( ( Block ) ASTNode . copySubtree ( target , getFinally ( ) ) ) ; 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 , getBody ( ) ) ; acceptChildren ( visitor , this . catchClauses ) ; acceptChild ( visitor , getFinally ( ) ) ; } visitor . endVisit ( this ) ; } public Block 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 ( Block body ) { if ( body == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . body ; preReplaceChild ( oldChild , body , BODY_PROPERTY ) ; this . body = body ; postReplaceChild ( oldChild , body , BODY_PROPERTY ) ; } public List catchClauses ( ) { return this . catchClauses ; } public Block getFinally ( ) { return this . optionalFinallyBody ; } public void setFinally ( Block block ) { ASTNode oldChild = this . optionalFinallyBody ; preReplaceChild ( oldChild , block , FINALLY_PROPERTY ) ; this . optionalFinallyBody = block ; postReplaceChild ( oldChild , block , FINALLY_PROPERTY ) ; } int memSize ( ) { return super . memSize ( ) + 3 * 4 ; } int treeSize ( ) { return memSize ( ) + ( this . body == null ? 0 : getBody ( ) . treeSize ( ) ) + this . catchClauses . listSize ( ) + ( this . optionalFinallyBody == null ? 0 : getFinally ( ) . treeSize ( ) ) ; } } </s>