<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class EnumDeclaration extends AbstractTypeDeclaration { public static final ChildPropertyDescriptor JAVADOC_PROPERTY = internalJavadocPropertyFactory ( EnumDeclaration . class ) ; public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = internalModifiers2PropertyFactory ( EnumDeclaration . class ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = internalNamePropertyFactory ( EnumDeclaration . class ) ; public static final ChildListPropertyDescriptor SUPER_INTERFACE_TYPES_PROPERTY = new ChildListPropertyDescriptor ( EnumDeclaration . class , "" , Type . class , NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor ENUM_CONSTANTS_PROPERTY = new ChildListPropertyDescriptor ( EnumDeclaration . class , "" , EnumConstantDeclaration . class , CYCLE_RISK ) ; public static final ChildListPropertyDescriptor BODY_DECLARATIONS_PROPERTY = internalBodyDeclarationPropertyFactory ( EnumDeclaration . class ) ; private static final List PROPERTY_DESCRIPTORS ; static { List properyList = new ArrayList ( 6 ) ; createPropertyList ( EnumDeclaration . class , properyList ) ; addProperty ( JAVADOC_PROPERTY , properyList ) ; addProperty ( MODIFIERS2_PROPERTY , properyList ) ; addProperty ( NAME_PROPERTY , properyList ) ; addProperty ( SUPER_INTERFACE_TYPES_PROPERTY , properyList ) ; addProperty ( ENUM_CONSTANTS_PROPERTY , properyList ) ; addProperty ( BODY_DECLARATIONS_PROPERTY , properyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( properyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private ASTNode . NodeList superInterfaceTypes = new ASTNode . NodeList ( SUPER_INTERFACE_TYPES_PROPERTY ) ; private ASTNode . NodeList enumConstants = new ASTNode . NodeList ( ENUM_CONSTANTS_PROPERTY ) ; EnumDeclaration ( 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 ; } } return super . internalGetSetChildProperty ( property , get , child ) ; } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { if ( property == MODIFIERS2_PROPERTY ) { return modifiers ( ) ; } if ( property == SUPER_INTERFACE_TYPES_PROPERTY ) { return superInterfaceTypes ( ) ; } if ( property == ENUM_CONSTANTS_PROPERTY ) { return enumConstants ( ) ; } if ( property == BODY_DECLARATIONS_PROPERTY ) { return bodyDeclarations ( ) ; } return super . internalGetChildListProperty ( property ) ; } final ChildPropertyDescriptor internalJavadocProperty ( ) { return JAVADOC_PROPERTY ; } final ChildListPropertyDescriptor internalModifiers2Property ( ) { return MODIFIERS2_PROPERTY ; } final SimplePropertyDescriptor internalModifiersProperty ( ) { return null ; } final ChildPropertyDescriptor internalNameProperty ( ) { return NAME_PROPERTY ; } final ChildListPropertyDescriptor internalBodyDeclarationsProperty ( ) { return BODY_DECLARATIONS_PROPERTY ; } final int getNodeType0 ( ) { return ENUM_DECLARATION ; } ASTNode clone0 ( AST target ) { EnumDeclaration result = new EnumDeclaration ( 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 . superInterfaceTypes ( ) . addAll ( ASTNode . copySubtrees ( target , superInterfaceTypes ( ) ) ) ; result . enumConstants ( ) . addAll ( ASTNode . copySubtrees ( target , enumConstants ( ) ) ) ; result . bodyDeclarations ( ) . addAll ( ASTNode . copySubtrees ( target , bodyDeclarations ( ) ) ) ; 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 . superInterfaceTypes ) ; acceptChildren ( visitor , this . enumConstants ) ; acceptChildren ( visitor , this . bodyDeclarations ) ; } visitor . endVisit ( this ) ; } public List superInterfaceTypes ( ) { return this . superInterfaceTypes ; } public List enumConstants ( ) { return this . enumConstants ; } ITypeBinding internalResolveBinding ( ) { return this . ast . getBindingResolver ( ) . resolveType ( this ) ; } int memSize ( ) { return super . memSize ( ) + 2 * 4 ; } int treeSize ( ) { return memSize ( ) + ( this . optionalDocComment == null ? 0 : getJavadoc ( ) . treeSize ( ) ) + this . modifiers . listSize ( ) + ( this . typeName == null ? 0 : getName ( ) . treeSize ( ) ) + this . superInterfaceTypes . listSize ( ) + this . enumConstants . listSize ( ) + this . bodyDeclarations . listSize ( ) ; } } </s>