KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > ejb > query > MemberCompNode


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.ejb.query;
13
14 /**
15  * collection_member_expression.
16  */

17 public class MemberCompNode extends Node {
18
19     private Node arg;
20     private boolean not;
21     private PathNode path;
22
23     public MemberCompNode(Node arg, boolean not, PathNode path) {
24         this.arg = arg;
25         this.not = not;
26         this.path = path;
27     }
28
29     public Node getArg() {
30         return arg;
31     }
32
33     public boolean isNot() {
34         return not;
35     }
36
37     public PathNode getPath() {
38         return path;
39     }
40
41     public Object JavaDoc arrive(NodeVisitor v, Object JavaDoc msg) {
42         return v.arriveMemberCompNode(this, msg);
43     }
44
45     public String JavaDoc toStringImp() {
46         StringBuffer JavaDoc s = new StringBuffer JavaDoc();
47         s.append(arg);
48         s.append(not ? " NOT MEMBER OF " : " MEMBER OF ");
49         s.append(path);
50         return s.toString();
51     }
52
53     public void resolve(ResolveContext rc) {
54         arg.resolve(rc);
55         path.resolve(rc);
56     }
57
58 }
59
60
Popular Tags