<s> package org . eclipse . jdt . core . dom ; import java . util . Iterator ; import java . util . List ; public abstract class BodyDeclaration extends ASTNode { Javadoc optionalDocComment = null ; private int modifierFlags = Modifier . NONE ; ASTNode . NodeList modifiers = null ; abstract SimplePropertyDescriptor internalModifiersProperty ( ) ; abstract ChildListPropertyDescriptor internalModifiers2Property ( ) ; public final ChildListPropertyDescriptor getModifiersProperty ( ) { return internalModifiers2Property ( ) ; } abstract ChildPropertyDescriptor internalJavadocProperty ( ) ; public final ChildPropertyDescriptor getJavadocProperty ( ) { return internalJavadocProperty ( ) ; } static final ChildPropertyDescriptor internalJavadocPropertyFactory ( Class nodeClass ) { return new ChildPropertyDescriptor ( nodeClass , "javadoc" , Javadoc . class , OPTIONAL , NO_CYCLE_RISK ) ; } static final SimplePropertyDescriptor internalModifiersPropertyFactory ( Class nodeClass ) { return new SimplePropertyDescriptor ( nodeClass , "modifiers" , int . class , MANDATORY ) ; } static final ChildListPropertyDescriptor internalModifiers2PropertyFactory ( Class nodeClass ) { return new ChildListPropertyDescriptor ( nodeClass , "modifiers" , IExtendedModifier . class , CYCLE_RISK ) ; } BodyDeclaration ( AST ast ) { super ( ast ) ; if ( ast . apiLevel >= AST . JLS3 ) { this . modifiers = new ASTNode . NodeList ( internalModifiers2Property ( ) ) ; } } public Javadoc getJavadoc ( ) { return this . optionalDocComment ; } public void setJavadoc ( Javadoc docComment ) { ChildPropertyDescriptor p = internalJavadocProperty ( ) ; ASTNode oldChild = this . optionalDocComment ; preReplaceChild ( oldChild , docComment , p ) ; this . optionalDocComment = docComment ; postReplaceChild ( oldChild , docComment , p ) ; } public int getModifiers ( ) { if ( this . modifiers == null ) { return this . modifierFlags ; } else { int computedmodifierFlags = Modifier . NONE ; for ( Iterator it = modifiers ( ) . iterator ( ) ; it . hasNext ( ) ; ) { Object x = it . next ( ) ; if ( x instanceof Modifier ) { computedmodifierFlags |= ( ( Modifier ) x ) . getKeyword ( ) . toFlagValue ( ) ; } } return computedmodifierFlags ; } } public void setModifiers ( int modifiers ) { internalSetModifiers ( modifiers ) ; } final void internalSetModifiers ( int pmodifiers ) { if ( this . modifiers != null ) { supportedOnlyIn2 ( ) ; } SimplePropertyDescriptor p = internalModifiersProperty ( ) ; preValueChange ( p ) ; this . modifierFlags = pmodifiers ; postValueChange ( p ) ; } public List modifiers ( ) { if ( this . modifiers == null ) { unsupportedIn2 ( ) ; } return this . modifiers ; } int memSize ( ) { return BASE_NODE_SIZE + 3 * 4 ; } } </s>