KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
15  * Container for method calls and array indexing.
16  */

17 public class PrimaryExprNode extends Node {
18
19     public PrimaryExprNode() {
20     }
21
22     public Field visit(MemVisitor visitor, Object JavaDoc obj) {
23         return visitor.visitPrimaryExprNode(this, obj);
24     }
25
26     /**
27      * Simplify this node tree as much as possible.
28      */

29     protected void normalizeImp() {
30         super.normalizeImp();
31         // convert this tree:
32
// PrimaryExprNode [this]
33
// FieldNavNode data (cast Address)
34
// into:
35
// FieldNavNode data (cast: Address)
36
if (parent != null && childList instanceof FieldNavNode) {
37             parent.replaceChild(this, childList);
38         }
39     }
40
41     public Object JavaDoc arrive(NodeVisitor v, Object JavaDoc msg) {
42         return v.arrivePrimaryExprNode(this, msg);
43     }
44
45 }
46
Popular Tags