1 // Nop.java, created Jul 7, 2004 11:50:51 PM by joewhaley
2 // Copyright (C) 2004 John Whaley <jwhaley@alum.mit.edu>
3 // Licensed under the terms of the GNU LGPL; see COPYING for details.
4 package net.sf.bddbddb.ir.dynamic;
5
6 import java.util.Collections;
7 import java.util.List;
8 import net.sf.bddbddb.Relation;
9 import net.sf.bddbddb.ir.Operation;
10
11 /***
12 * No operation.
13 *
14 * @author John Whaley
15 * @version $Id: Nop.java 328 2004-10-16 02:45:30Z joewhaley $
16 */
17 public class Nop extends DynamicOperation {
18 /*
19 * (non-Javadoc)
20 *
21 * @see net.sf.bddbddb.ir.dynamic.DynamicOperation#visit(net.sf.bddbddb.ir.dynamic.DynamicOperationVisitor)
22 */
23 public Object visit(DynamicOperationVisitor i) {
24 return i.visit(this);
25 }
26
27 /*
28 * (non-Javadoc)
29 *
30 * @see java.lang.Object#toString()
31 */
32 public String toString() {
33 return getExpressionString();
34 }
35
36 /*
37 * (non-Javadoc)
38 *
39 * @see net.sf.bddbddb.ir.Operation#getRelationDest()
40 */
41 public Relation getRelationDest() {
42 return null;
43 }
44
45 /*
46 * (non-Javadoc)
47 *
48 * @see net.sf.bddbddb.ir.Operation#getSrcs()
49 */
50 public List getSrcs() {
51 return Collections.EMPTY_LIST;
52 }
53
54 /*
55 * (non-Javadoc)
56 *
57 * @see net.sf.bddbddb.ir.Operation#getExpressionString()
58 */
59 public String getExpressionString() {
60 return "nop" + Integer.toString(id);
61 }
62
63 /*
64 * (non-Javadoc)
65 *
66 * @see net.sf.bddbddb.ir.Operation#setRelationDest(net.sf.bddbddb.Relation)
67 */
68 public void setRelationDest(Relation dest) {
69 }
70
71 public Operation copy() {
72 return new Nop();
73 }
74
75 /*
76 * (non-Javadoc)
77 *
78 * @see net.sf.bddbddb.ir.Operation#replaceSrc(net.sf.bddbddb.Relation,
79 * net.sf.bddbddb.Relation)
80 */
81 public void replaceSrc(Relation r_old, Relation r_new) {
82 }
83 }