/* BaseOperand.java (c) 2010-2013 Edward Swartz All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html */ package v9t9.tools.asm.operand.hl; /** * @author ejs * */ public abstract class BaseOperand implements AssemblerOperand { /* (non-Javadoc) * @see v9t9.tools.asm.operand.hl.AssemblerOperand#replaceOperand(v9t9.tools.asm.operand.hl.AssemblerOperand, v9t9.tools.asm.operand.hl.AssemblerOperand) */ @Override public AssemblerOperand replaceOperand(AssemblerOperand src, AssemblerOperand dst) { if (src.equals(this)) return dst; return this; } /* (non-Javadoc) * @see v9t9.tools.asm.operand.hl.AssemblerOperand#accept(v9t9.tools.asm.operand.hl.IOperandVisitor) */ @Override public void accept(IOperandVisitor visitor) { if (visitor.enterOperand(this)) { for (AssemblerOperand kid : getChildren()) kid.accept(visitor); visitor.exitOperand(this); } } }