<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class EnumConstantDeclaration extends BodyDeclaration { public static final ChildPropertyDescriptor JAVADOC_PROPERTY = internalJavadocPropertyFactory ( EnumConstantDeclaration . class ) ; public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = internalModifiers2PropertyFactory ( EnumConstantDeclaration . class ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( EnumConstantDeclaration . class , "name" , SimpleName . class , MANDATORY , NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor ARGUMENTS_PROPERTY = new ChildListPropertyDescriptor ( EnumConstantDeclaration . class , "arguments" , Expression . class , NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor ANONYMOUS_CLASS_DECLARATION_PROPERTY = new ChildPropertyDescriptor ( EnumConstantDeclaration . class , "" , AnonymousClassDeclaration . class , OPTIONAL , CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; static { List properyList = new ArrayList ( 6 ) ; createPropertyList ( EnumConstantDeclaration . class , properyList ) ; addProperty ( JAVADOC_PROPERTY , properyList ) ; addProperty ( MODIFIERS2_PROPERTY , properyList ) ; addProperty ( NAME_PROPERTY , properyList ) ; addProperty ( ARGUMENTS_PROPERTY , properyList ) ; addProperty ( ANONYMOUS_CLASS_DECLARATION_PROPERTY , properyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( properyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private SimpleName constantName = null ; private ASTNode . NodeList arguments = new ASTNode . NodeList ( ARGUMENTS_PROPERTY ) ; private AnonymousClassDeclaration optionalAnonymousClassDeclaration = null ; EnumConstantDeclaration ( AST ast ) { super ( ast ) ; unsupportedIn2 ( ) ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { if ( property == JAVADOC_PROPERTY ) { if ( get ) { return getJavadoc ( ) ; } else { setJavadoc ( ( Javadoc ) child ) ; return null ; } } if ( property == NAME_PROPERTY ) { if ( get ) { return getName ( ) ; } else { setName ( ( SimpleName ) child ) ; return null ; } } if ( property == ANONYMOUS_CLASS_DECLARATION_PROPERTY ) { if ( get ) { return getAnonymousClassDeclaration ( ) ; } else { setAnonymousClassDeclaration ( ( AnonymousClassDeclaration ) child ) ; return null ; } } return super . internalGetSetChildProperty ( property , get , child ) ; } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { if ( property == MODIFIERS2_PROPERTY ) { return modifiers ( ) ; } if ( property == ARGUMENTS_PROPERTY ) { return arguments ( ) ; } return super . internalGetChildListProperty ( property ) ; } final ChildPropertyDescriptor internalJavadocProperty ( ) { return JAVADOC_PROPERTY ; } final ChildListPropertyDescriptor internalModifiers2Property ( ) { return MODIFIERS2_PROPERTY ; } final SimplePropertyDescriptor internalModifiersProperty ( ) { return null ; } final int getNodeType0 ( ) { return ENUM_CONSTANT_DECLARATION ; } ASTNode clone0 ( AST target ) { EnumConstantDeclaration result = new EnumConstantDeclaration ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setJavadoc ( ( Javadoc ) ASTNode . copySubtree ( target , getJavadoc ( ) ) ) ; result . modifiers ( ) . addAll ( ASTNode . copySubtrees ( target , modifiers ( ) ) ) ; result . setName ( ( SimpleName ) getName ( ) . clone ( target ) ) ; result . arguments ( ) . addAll ( ASTNode . copySubtrees ( target , arguments ( ) ) ) ; result . setAnonymousClassDeclaration ( ( AnonymousClassDeclaration ) ASTNode . copySubtree ( target , getAnonymousClassDeclaration ( ) ) ) ; 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 , getJavadoc ( ) ) ; acceptChildren ( visitor , this . modifiers ) ; acceptChild ( visitor , getName ( ) ) ; acceptChildren ( visitor , this . arguments ) ; acceptChild ( visitor , getAnonymousClassDeclaration ( ) ) ; } visitor . endVisit ( this ) ; } public SimpleName getName ( ) { if ( this . constantName == null ) { synchronized ( this ) { if ( this . constantName == null ) { preLazyInit ( ) ; this . constantName = new SimpleName ( this . ast ) ; postLazyInit ( this . constantName , NAME_PROPERTY ) ; } } } return this . constantName ; } public void setName ( SimpleName constantName ) { if ( constantName == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . constantName ; preReplaceChild ( oldChild , constantName , NAME_PROPERTY ) ; this . constantName = constantName ; postReplaceChild ( oldChild , constantName , NAME_PROPERTY ) ; } public List arguments ( ) { return this . arguments ; } public AnonymousClassDeclaration getAnonymousClassDeclaration ( ) { return this . optionalAnonymousClassDeclaration ; } public void setAnonymousClassDeclaration ( AnonymousClassDeclaration decl ) { ASTNode oldChild = this . optionalAnonymousClassDeclaration ; preReplaceChild ( oldChild , decl , ANONYMOUS_CLASS_DECLARATION_PROPERTY ) ; this . optionalAnonymousClassDeclaration = decl ; postReplaceChild ( oldChild , decl , ANONYMOUS_CLASS_DECLARATION_PROPERTY ) ; } public IMethodBinding resolveConstructorBinding ( ) { return this . ast . getBindingResolver ( ) . resolveConstructor ( this ) ; } public IVariableBinding resolveVariable ( ) { return this . ast . getBindingResolver ( ) . resolveVariable ( this ) ; } int memSize ( ) { return super . memSize ( ) + 3 * 4 ; } int treeSize ( ) { return memSize ( ) + ( this . optionalDocComment == null ? 0 : getJavadoc ( ) . treeSize ( ) ) + this . modifiers . listSize ( ) + ( this . constantName == null ? 0 : getName ( ) . treeSize ( ) ) + this . arguments . listSize ( ) + ( this . optionalAnonymousClassDeclaration == null ? 0 : getAnonymousClassDeclaration ( ) . treeSize ( ) ) ; } } </s>