<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class CatchClause extends ASTNode { public static final ChildPropertyDescriptor EXCEPTION_PROPERTY = new ChildPropertyDescriptor ( CatchClause . class , "exception" , SingleVariableDeclaration . class , MANDATORY , CYCLE_RISK ) ; public static final ChildPropertyDescriptor BODY_PROPERTY = new ChildPropertyDescriptor ( CatchClause . class , "body" , Block . class , MANDATORY , CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; static { List properyList = new ArrayList ( 3 ) ; createPropertyList ( CatchClause . class , properyList ) ; addProperty ( EXCEPTION_PROPERTY , properyList ) ; addProperty ( BODY_PROPERTY , properyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( properyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private Block body = null ; private SingleVariableDeclaration exceptionDecl = null ; CatchClause ( AST ast ) { super ( ast ) ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { if ( property == EXCEPTION_PROPERTY ) { if ( get ) { return getException ( ) ; } else { setException ( ( SingleVariableDeclaration ) child ) ; return null ; } } if ( property == BODY_PROPERTY ) { if ( get ) { return getBody ( ) ; } else { setBody ( ( Block ) child ) ; return null ; } } return super . internalGetSetChildProperty ( property , get , child ) ; } final int getNodeType0 ( ) { return CATCH_CLAUSE ; } ASTNode clone0 ( AST target ) { CatchClause result = new CatchClause ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setBody ( ( Block ) getBody ( ) . clone ( target ) ) ; result . setException ( ( SingleVariableDeclaration ) ASTNode . copySubtree ( target , getException ( ) ) ) ; 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 , getException ( ) ) ; acceptChild ( visitor , getBody ( ) ) ; } visitor . endVisit ( this ) ; } public SingleVariableDeclaration getException ( ) { if ( this . exceptionDecl == null ) { synchronized ( this ) { if ( this . exceptionDecl == null ) { preLazyInit ( ) ; this . exceptionDecl = new SingleVariableDeclaration ( this . ast ) ; postLazyInit ( this . exceptionDecl , EXCEPTION_PROPERTY ) ; } } } return this . exceptionDecl ; } public void setException ( SingleVariableDeclaration exception ) { if ( exception == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . exceptionDecl ; preReplaceChild ( oldChild , exception , EXCEPTION_PROPERTY ) ; this . exceptionDecl = exception ; postReplaceChild ( oldChild , exception , EXCEPTION_PROPERTY ) ; } 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 ) ; } int memSize ( ) { return BASE_NODE_SIZE + 2 * 4 ; } int treeSize ( ) { return memSize ( ) + ( this . exceptionDecl == null ? 0 : getException ( ) . treeSize ( ) ) + ( this . body == null ? 0 : getBody ( ) . treeSize ( ) ) ; } } </s>