<s> package org . eclipse . jdt . core . dom ; import java . util . ArrayList ; import java . util . List ; public class InstanceofExpression extends Expression { public static final ChildPropertyDescriptor LEFT_OPERAND_PROPERTY = new ChildPropertyDescriptor ( InstanceofExpression . class , "leftOperand" , Expression . class , MANDATORY , CYCLE_RISK ) ; public static final ChildPropertyDescriptor RIGHT_OPERAND_PROPERTY = new ChildPropertyDescriptor ( InstanceofExpression . class , "rightOperand" , Type . class , MANDATORY , CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; static { List properyList = new ArrayList ( 3 ) ; createPropertyList ( InstanceofExpression . class , properyList ) ; addProperty ( LEFT_OPERAND_PROPERTY , properyList ) ; addProperty ( RIGHT_OPERAND_PROPERTY , properyList ) ; PROPERTY_DESCRIPTORS = reapPropertyList ( properyList ) ; } public static List propertyDescriptors ( int apiLevel ) { return PROPERTY_DESCRIPTORS ; } private Expression leftOperand = null ; private Type rightOperand = null ; InstanceofExpression ( AST ast ) { super ( ast ) ; } final List internalStructuralPropertiesForType ( int apiLevel ) { return propertyDescriptors ( apiLevel ) ; } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { if ( property == LEFT_OPERAND_PROPERTY ) { if ( get ) { return getLeftOperand ( ) ; } else { setLeftOperand ( ( Expression ) child ) ; return null ; } } if ( property == RIGHT_OPERAND_PROPERTY ) { if ( get ) { return getRightOperand ( ) ; } else { setRightOperand ( ( Type ) child ) ; return null ; } } return super . internalGetSetChildProperty ( property , get , child ) ; } final int getNodeType0 ( ) { return INSTANCEOF_EXPRESSION ; } ASTNode clone0 ( AST target ) { InstanceofExpression result = new InstanceofExpression ( target ) ; result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; result . setLeftOperand ( ( Expression ) getLeftOperand ( ) . clone ( target ) ) ; result . setRightOperand ( ( Type ) getRightOperand ( ) . clone ( target ) ) ; 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 , getLeftOperand ( ) ) ; acceptChild ( visitor , getRightOperand ( ) ) ; } visitor . endVisit ( this ) ; } public Expression getLeftOperand ( ) { if ( this . leftOperand == null ) { synchronized ( this ) { if ( this . leftOperand == null ) { preLazyInit ( ) ; this . leftOperand = new SimpleName ( this . ast ) ; postLazyInit ( this . leftOperand , LEFT_OPERAND_PROPERTY ) ; } } } return this . leftOperand ; } public void setLeftOperand ( Expression expression ) { if ( expression == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . leftOperand ; preReplaceChild ( oldChild , expression , LEFT_OPERAND_PROPERTY ) ; this . leftOperand = expression ; postReplaceChild ( oldChild , expression , LEFT_OPERAND_PROPERTY ) ; } public Type getRightOperand ( ) { if ( this . rightOperand == null ) { synchronized ( this ) { if ( this . rightOperand == null ) { preLazyInit ( ) ; this . rightOperand = new SimpleType ( this . ast ) ; postLazyInit ( this . rightOperand , RIGHT_OPERAND_PROPERTY ) ; } } } return this . rightOperand ; } public void setRightOperand ( Type referenceType ) { if ( referenceType == null ) { throw new IllegalArgumentException ( ) ; } ASTNode oldChild = this . rightOperand ; preReplaceChild ( oldChild , referenceType , RIGHT_OPERAND_PROPERTY ) ; this . rightOperand = referenceType ; postReplaceChild ( oldChild , referenceType , RIGHT_OPERAND_PROPERTY ) ; } int memSize ( ) { return BASE_NODE_SIZE + 2 * 4 ; } int treeSize ( ) { return memSize ( ) + ( this . leftOperand == null ? 0 : getLeftOperand ( ) . treeSize ( ) ) + ( this . rightOperand == null ? 0 : getRightOperand ( ) . treeSize ( ) ) ; } } </s>