<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class TypeParameter extends ASTNode { public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( TypeParameter . class , "name" , SimpleName . class , MANDATORY , NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor TYPE_BOUNDS_PROPERTY = new ChildListPropertyDescriptor ( TypeParameter . class , "typeBounds" , Type . class , NO_CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; static { List propertyList = new ArrayList ( 3 ) ; createPropertyList ( TypeParameter . class , propertyList ) ; addProperty ( NAME_PROPERTY , propertyList ) ; addProperty ( TYPE_BOUNDS_PROPERTY , propertyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( propertyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private SimpleName typeVariableName = null ; private ASTNode . NodeList typeBounds = new ASTNode . NodeList ( TYPE_BOUNDS_PROPERTY ) ; TypeParameter ( AST ast ) { super ( ast ) ; unsupportedIn2 ( ) ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { 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 == TYPE_BOUNDS_PROPERTY ) { return typeBounds ( ) ; } return super . internalGetChildListProperty ( property ) ; } final int getNodeType0 ( ) { return TYPE_PARAMETER ; } ASTNode clone0 ( AST target ) { TypeParameter result = new TypeParameter ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setName ( ( SimpleName ) ( ( ASTNode ) getName ( ) ) . clone ( target ) ) ; result . typeBounds ( ) . addAll ( ASTNode . copySubtrees ( target , typeBounds ( ) ) ) ; 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 , getName ( ) ) ; acceptChildren ( visitor , this . typeBounds ) ; } visitor . endVisit ( this ) ; } public SimpleName getName ( ) { if ( this . typeVariableName == null ) { synchronized ( this ) { if ( this . typeVariableName == null ) { preLazyInit ( ) ; this . typeVariableName = new SimpleName ( this . ast ) ; postLazyInit ( this . typeVariableName , NAME_PROPERTY ) ; } } } return this . typeVariableName ; } public final ITypeBinding resolveBinding ( ) { return this . ast . getBindingResolver ( ) . resolveTypeParameter ( this ) ; } public void setName ( SimpleName typeName ) { if ( typeName == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . typeVariableName ; preReplaceChild ( oldChild , typeName , NAME_PROPERTY ) ; this . typeVariableName = typeName ; postReplaceChild ( oldChild , typeName , NAME_PROPERTY ) ; } public List typeBounds ( ) { return this . typeBounds ; } int memSize ( ) { return BASE_NODE_SIZE + 2 * 4 ; } int treeSize ( ) { return memSize ( ) + ( this . typeVariableName == null ? 0 : getName ( ) . treeSize ( ) ) + this . typeBounds . listSize ( ) ; } } </s>