<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class MethodRef extends ASTNode implements IDocElement { public static final ChildPropertyDescriptor QUALIFIER_PROPERTY = new ChildPropertyDescriptor ( MethodRef . class , "qualifier" , Name . class , OPTIONAL , NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( MethodRef . class , "name" , SimpleName . class , MANDATORY , NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor PARAMETERS_PROPERTY = new ChildListPropertyDescriptor ( MethodRef . class , "parameters" , MethodRefParameter . class , NO_CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; static { List properyList = new ArrayList ( 4 ) ; createPropertyList ( MethodRef . class , properyList ) ; addProperty ( QUALIFIER_PROPERTY , properyList ) ; addProperty ( NAME_PROPERTY , properyList ) ; addProperty ( PARAMETERS_PROPERTY , properyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( properyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private Name optionalQualifier = null ; private SimpleName methodName = null ; private ASTNode . NodeList parameters = new ASTNode . NodeList ( PARAMETERS_PROPERTY ) ; MethodRef ( AST ast ) { super ( ast ) ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { if ( property == QUALIFIER_PROPERTY ) { if ( get ) { return getQualifier ( ) ; } else { setQualifier ( ( Name ) 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 == PARAMETERS_PROPERTY ) { return parameters ( ) ; } return super . internalGetChildListProperty ( property ) ; } final int getNodeType0 ( ) { return METHOD_REF ; } ASTNode clone0 ( AST target ) { MethodRef result = new MethodRef ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setQualifier ( ( Name ) ASTNode . copySubtree ( target , getQualifier ( ) ) ) ; result . setName ( ( SimpleName ) ASTNode . copySubtree ( target , getName ( ) ) ) ; result . parameters ( ) . addAll ( ASTNode . copySubtrees ( target , parameters ( ) ) ) ; 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 , getQualifier ( ) ) ; acceptChild ( visitor , getName ( ) ) ; acceptChildren ( visitor , this . parameters ) ; } visitor . endVisit ( this ) ; } public Name getQualifier ( ) { return this . optionalQualifier ; } public void setQualifier ( Name name ) { ASTNode oldChild = this . optionalQualifier ; preReplaceChild ( oldChild , name , QUALIFIER_PROPERTY ) ; this . optionalQualifier = name ; postReplaceChild ( oldChild , name , QUALIFIER_PROPERTY ) ; } public SimpleName getName ( ) { if ( this . methodName == null ) { synchronized ( this ) { if ( this . methodName == null ) { preLazyInit ( ) ; this . methodName = new SimpleName ( this . ast ) ; postLazyInit ( this . methodName , NAME_PROPERTY ) ; } } } return this . methodName ; } public void setName ( SimpleName name ) { if ( name == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . methodName ; preReplaceChild ( oldChild , name , NAME_PROPERTY ) ; this . methodName = name ; postReplaceChild ( oldChild , name , NAME_PROPERTY ) ; } public List parameters ( ) { return this . parameters ; } public final IBinding resolveBinding ( ) { return this . ast . getBindingResolver ( ) . resolveReference ( this ) ; } int memSize ( ) { return BASE_NODE_SIZE + 3 * 4 ; } int treeSize ( ) { return memSize ( ) + ( this . optionalQualifier == null ? 0 : getQualifier ( ) . treeSize ( ) ) + ( this . methodName == null ? 0 : getName ( ) . treeSize ( ) ) + this . parameters . listSize ( ) ; } } </s>