KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdo > query > VarBindingNode


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdo.query;
13
14 import com.versant.core.common.CmdBitSet;
15
16 /**
17  * This Node is added to the tree to bind 'unbound' variables to the extent
18  * of the variables class.
19  */

20 public class VarBindingNode extends LeafNode {
21
22     private final VarNode var;
23
24     public VarBindingNode(VarNode var) {
25         this.var = var;
26     }
27
28     public VarNode getVar() {
29         return var;
30     }
31
32     public String JavaDoc toString() {
33         return super.toString() + " " + var;
34     }
35
36     public void updateEvictionDependency(CmdBitSet bitSet) {
37         var.updateEvictionDependency(bitSet);
38     }
39
40     public Object JavaDoc accept(NodeVisitor visitor, Object JavaDoc[] results) {
41         return visitor.visitVarBindingNode(this, results);
42     }
43
44     public Object JavaDoc arrive(NodeVisitor v, Object JavaDoc msg) {
45         return v.arriveVarBindingNode(this, msg);
46     }
47
48 }
49
Popular Tags