<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class VariableDeclarationFragment extends VariableDeclaration { public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( VariableDeclarationFragment . class , "name" , SimpleName . class , MANDATORY , NO_CYCLE_RISK ) ; public static final SimplePropertyDescriptor EXTRA_DIMENSIONS_PROPERTY = new SimplePropertyDescriptor ( VariableDeclarationFragment . class , "" , int . class , MANDATORY ) ; public static final ChildPropertyDescriptor INITIALIZER_PROPERTY = new ChildPropertyDescriptor ( VariableDeclarationFragment . class , "initializer" , Expression . class , OPTIONAL , CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; static { List propertyList = new ArrayList ( 4 ) ; createPropertyList ( VariableDeclarationFragment . class , propertyList ) ; addProperty ( NAME_PROPERTY , propertyList ) ; addProperty ( EXTRA_DIMENSIONS_PROPERTY , propertyList ) ; addProperty ( INITIALIZER_PROPERTY , propertyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( propertyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private SimpleName variableName = null ; private int extraArrayDimensions = 0 ; private Expression optionalInitializer = null ; VariableDeclarationFragment ( AST ast ) { super ( ast ) ; } final SimplePropertyDescriptor internalExtraDimensionsProperty ( ) { return EXTRA_DIMENSIONS_PROPERTY ; } final ChildPropertyDescriptor internalInitializerProperty ( ) { return INITIALIZER_PROPERTY ; } final ChildPropertyDescriptor internalNameProperty ( ) { return NAME_PROPERTY ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final int internalGetSetIntProperty ( SimplePropertyDescriptor property , boolean get , int value ) { if ( property == EXTRA_DIMENSIONS_PROPERTY ) { if ( get ) { return getExtraDimensions ( ) ; } else { setExtraDimensions ( value ) ; return 0 ; } } return super . internalGetSetIntProperty ( property , get , value ) ; } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { if ( property == NAME_PROPERTY ) { if ( get ) { return getName ( ) ; } else { setName ( ( SimpleName ) child ) ; return null ; } } if ( property == INITIALIZER_PROPERTY ) { if ( get ) { return getInitializer ( ) ; } else { setInitializer ( ( Expression ) child ) ; return null ; } } return super . internalGetSetChildProperty ( property , get , child ) ; } final int getNodeType0 ( ) { return VARIABLE_DECLARATION_FRAGMENT ; } ASTNode clone0 ( AST target ) { VariableDeclarationFragment result = new VariableDeclarationFragment ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setName ( ( SimpleName ) getName ( ) . clone ( target ) ) ; result . setExtraDimensions ( getExtraDimensions ( ) ) ; result . setInitializer ( ( Expression ) ASTNode . copySubtree ( target , getInitializer ( ) ) ) ; 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 , getName ( ) ) ; acceptChild ( visitor , getInitializer ( ) ) ; } visitor . endVisit ( this ) ; } public SimpleName getName ( ) { if ( this . variableName == null ) { synchronized ( this ) { if ( this . variableName == null ) { preLazyInit ( ) ; this . variableName = new SimpleName ( this . ast ) ; postLazyInit ( this . variableName , NAME_PROPERTY ) ; } } } return this . variableName ; } public void setName ( SimpleName variableName ) { if ( variableName == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . variableName ; preReplaceChild ( oldChild , variableName , NAME_PROPERTY ) ; this . variableName = variableName ; postReplaceChild ( oldChild , variableName , NAME_PROPERTY ) ; } public int getExtraDimensions ( ) { return this . extraArrayDimensions ; } public void setExtraDimensions ( int dimensions ) { if ( dimensions < 0 ) { throw new IllegalArgumentException ( ) ; } preValueChange ( EXTRA_DIMENSIONS_PROPERTY ) ; this . extraArrayDimensions = dimensions ; postValueChange ( EXTRA_DIMENSIONS_PROPERTY ) ; } public Expression getInitializer ( ) { return this . optionalInitializer ; } public void setInitializer ( Expression initializer ) { ASTNode oldChild = this . optionalInitializer ; preReplaceChild ( oldChild , initializer , INITIALIZER_PROPERTY ) ; this . optionalInitializer = initializer ; postReplaceChild ( oldChild , initializer , INITIALIZER_PROPERTY ) ; } int memSize ( ) { return BASE_NODE_SIZE + 3 * 4 ; } int treeSize ( ) { return memSize ( ) + ( this . variableName == null ? 0 : getName ( ) . treeSize ( ) ) + ( this . optionalInitializer == null ? 0 : getInitializer ( ) . treeSize ( ) ) ; } } </s>