<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class AnnotationTypeMemberDeclaration extends BodyDeclaration { public static final ChildPropertyDescriptor JAVADOC_PROPERTY = internalJavadocPropertyFactory ( AnnotationTypeMemberDeclaration . class ) ; public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = internalModifiers2PropertyFactory ( AnnotationTypeMemberDeclaration . class ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( AnnotationTypeMemberDeclaration . class , "name" , SimpleName . class , MANDATORY , NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor TYPE_PROPERTY = new ChildPropertyDescriptor ( AnnotationTypeMemberDeclaration . class , "type" , Type . class , MANDATORY , NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor DEFAULT_PROPERTY = new ChildPropertyDescriptor ( AnnotationTypeMemberDeclaration . class , "default" , Expression . class , OPTIONAL , CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; static { List properyList = new ArrayList ( 6 ) ; createPropertyList ( AnnotationTypeMemberDeclaration . class , properyList ) ; addProperty ( JAVADOC_PROPERTY , properyList ) ; addProperty ( MODIFIERS2_PROPERTY , properyList ) ; addProperty ( NAME_PROPERTY , properyList ) ; addProperty ( TYPE_PROPERTY , properyList ) ; addProperty ( DEFAULT_PROPERTY , properyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( properyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private SimpleName memberName = null ; private Type memberType = null ; private Expression optionalDefaultValue = null ; AnnotationTypeMemberDeclaration ( 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 == NAME_PROPERTY ) { if ( get ) { return getName ( ) ; } else { setName ( ( SimpleName ) child ) ; return null ; } } if ( property == TYPE_PROPERTY ) { if ( get ) { return getType ( ) ; } else { setType ( ( Type ) child ) ; return null ; } } if ( property == DEFAULT_PROPERTY ) { if ( get ) { return getDefault ( ) ; } else { setDefault ( ( Expression ) child ) ; return null ; } } return super . internalGetSetChildProperty ( property , get , child ) ; } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { if ( property == MODIFIERS2_PROPERTY ) { return modifiers ( ) ; } 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 ANNOTATION_TYPE_MEMBER_DECLARATION ; } ASTNode clone0 ( AST target ) { AnnotationTypeMemberDeclaration result = new AnnotationTypeMemberDeclaration ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setJavadoc ( ( Javadoc ) ASTNode . copySubtree ( target , getJavadoc ( ) ) ) ; result . modifiers ( ) . addAll ( ASTNode . copySubtrees ( target , modifiers ( ) ) ) ; result . setType ( ( Type ) ASTNode . copySubtree ( target , getType ( ) ) ) ; result . setName ( ( SimpleName ) getName ( ) . clone ( target ) ) ; result . setDefault ( ( Expression ) ASTNode . copySubtree ( target , getDefault ( ) ) ) ; 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 , getType ( ) ) ; acceptChild ( visitor , getName ( ) ) ; acceptChild ( visitor , getDefault ( ) ) ; } visitor . endVisit ( this ) ; } public SimpleName getName ( ) { if ( this . memberName == null ) { synchronized ( this ) { if ( this . memberName == null ) { preLazyInit ( ) ; this . memberName = new SimpleName ( this . ast ) ; postLazyInit ( this . memberName , NAME_PROPERTY ) ; } } } return this . memberName ; } public void setName ( SimpleName memberName ) { if ( memberName == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . memberName ; preReplaceChild ( oldChild , memberName , NAME_PROPERTY ) ; this . memberName = memberName ; postReplaceChild ( oldChild , memberName , NAME_PROPERTY ) ; } public Type getType ( ) { if ( this . memberType == null ) { synchronized ( this ) { if ( this . memberType == null ) { preLazyInit ( ) ; this . memberType = this . ast . newPrimitiveType ( PrimitiveType . INT ) ; postLazyInit ( this . memberType , TYPE_PROPERTY ) ; } } } return this . memberType ; } public void setType ( Type type ) { if ( type == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . memberType ; preReplaceChild ( oldChild , type , TYPE_PROPERTY ) ; this . memberType = type ; postReplaceChild ( oldChild , type , TYPE_PROPERTY ) ; } public Expression getDefault ( ) { return this . optionalDefaultValue ; } public void setDefault ( Expression defaultValue ) { ASTNode oldChild = this . optionalDefaultValue ; preReplaceChild ( oldChild , defaultValue , DEFAULT_PROPERTY ) ; this . optionalDefaultValue = defaultValue ; postReplaceChild ( oldChild , defaultValue , DEFAULT_PROPERTY ) ; } public IMethodBinding resolveBinding ( ) { return this . ast . getBindingResolver ( ) . resolveMember ( this ) ; } int memSize ( ) { return super . memSize ( ) + 3 * 4 ; } int treeSize ( ) { return memSize ( ) + ( this . optionalDocComment == null ? 0 : getJavadoc ( ) . treeSize ( ) ) + this . modifiers . listSize ( ) + ( this . memberName == null ? 0 : getName ( ) . treeSize ( ) ) + ( this . memberType == null ? 0 : getType ( ) . treeSize ( ) ) + ( this . optionalDefaultValue == null ? 0 : getDefault ( ) . treeSize ( ) ) ; } } </s>