<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class MethodRefParameter extends ASTNode { public static final ChildPropertyDescriptor TYPE_PROPERTY = new ChildPropertyDescriptor ( MethodRefParameter . class , "type" , Type . class , MANDATORY , NO_CYCLE_RISK ) ; public static final SimplePropertyDescriptor VARARGS_PROPERTY = new SimplePropertyDescriptor ( MethodRefParameter . class , "varargs" , boolean . class , MANDATORY ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( MethodRefParameter . class , "name" , SimpleName . class , OPTIONAL , NO_CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS_2_0 ; private static final List PROPERTY_DESCRIPTORS_3_0 ; static { List properyList = new ArrayList ( 3 ) ; createPropertyList ( MethodRefParameter . class , properyList ) ; addProperty ( TYPE_PROPERTY , properyList ) ; addProperty ( NAME_PROPERTY , properyList ) ; PROPERTY_DESCRIPTORS_2_0 = reapPropertyList ( properyList ) ; properyList = new ArrayList ( 3 ) ; createPropertyList ( MethodRefParameter . class , properyList ) ; addProperty ( TYPE_PROPERTY , properyList ) ; addProperty ( VARARGS_PROPERTY , properyList ) ; addProperty ( NAME_PROPERTY , properyList ) ; PROPERTY_DESCRIPTORS_3_0 = reapPropertyList ( properyList ) ; } public static List propertyDescriptors ( int apiLevel ) { if ( apiLevel == AST . JLS2_INTERNAL ) { return PROPERTY_DESCRIPTORS_2_0 ; } else { return PROPERTY_DESCRIPTORS_3_0 ; } } private Type type = null ; private boolean variableArity = false ; private SimpleName optionalParameterName = null ; MethodRefParameter ( AST ast ) { super ( ast ) ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { if ( property == TYPE_PROPERTY ) { if ( get ) { return getType ( ) ; } else { setType ( ( Type ) child ) ; return null ; } } if ( property == NAME_PROPERTY ) { if ( get ) { return getName ( ) ; } else { setName ( ( SimpleName ) child ) ; return null ; } } return super . internalGetSetChildProperty ( property , get , child ) ; } final boolean internalGetSetBooleanProperty ( SimplePropertyDescriptor property , boolean get , boolean value ) { if ( property == VARARGS_PROPERTY ) { if ( get ) { return isVarargs ( ) ; } else { setVarargs ( value ) ; return false ; } } return super . internalGetSetBooleanProperty ( property , get , value ) ; } final int getNodeType0 ( ) { return METHOD_REF_PARAMETER ; } ASTNode clone0 ( AST target ) { MethodRefParameter result = new MethodRefParameter ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setType ( ( Type ) ASTNode . copySubtree ( target , getType ( ) ) ) ; if ( this . ast . apiLevel >= AST . JLS3 ) { result . setVarargs ( isVarargs ( ) ) ; } result . setName ( ( SimpleName ) ASTNode . copySubtree ( target , getName ( ) ) ) ; 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 , getType ( ) ) ; acceptChild ( visitor , getName ( ) ) ; } visitor . endVisit ( this ) ; } public Type getType ( ) { if ( this . type == null ) { synchronized ( this ) { if ( this . type == null ) { preLazyInit ( ) ; this . type = this . ast . newPrimitiveType ( PrimitiveType . INT ) ; postLazyInit ( this . type , TYPE_PROPERTY ) ; } } } return this . type ; } public void setType ( Type type ) { if ( type == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . type ; preReplaceChild ( oldChild , type , TYPE_PROPERTY ) ; this . type = type ; postReplaceChild ( oldChild , type , TYPE_PROPERTY ) ; } public boolean isVarargs ( ) { unsupportedIn2 ( ) ; return this . variableArity ; } public void setVarargs ( boolean variableArity ) { unsupportedIn2 ( ) ; preValueChange ( VARARGS_PROPERTY ) ; this . variableArity = variableArity ; postValueChange ( VARARGS_PROPERTY ) ; } public SimpleName getName ( ) { return this . optionalParameterName ; } public void setName ( SimpleName name ) { ASTNode oldChild = this . optionalParameterName ; preReplaceChild ( oldChild , name , NAME_PROPERTY ) ; this . optionalParameterName = name ; postReplaceChild ( oldChild , name , NAME_PROPERTY ) ; } int memSize ( ) { return BASE_NODE_SIZE + 2 * 5 ; } int treeSize ( ) { return memSize ( ) + ( this . type == null ? 0 : getType ( ) . treeSize ( ) ) + ( this . optionalParameterName == null ? 0 : getName ( ) . treeSize ( ) ) ; } } </s>