KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > genimen > djeneric > repository > oql > core > nodes > BracketNode


1 package com.genimen.djeneric.repository.oql.core.nodes;
2
3 import java.util.HashMap JavaDoc;
4
5 import com.genimen.djeneric.repository.oql.core.DjOqlParserEngine;
6 import com.genimen.djeneric.repository.oql.core.SimpleNode;
7
8 public class BracketNode extends SimpleNode
9 {
10   private String JavaDoc _bracket;
11
12   public BracketNode(int i)
13   {
14     super(i);
15   }
16
17   public BracketNode(DjOqlParserEngine p, int i)
18   {
19     super(p, i);
20   }
21
22   public String JavaDoc getName()
23   {
24     return toString();
25   }
26
27   public String JavaDoc toString()
28   {
29     return _bracket;
30   }
31
32   public void translate(StringBuffer JavaDoc result, HashMap JavaDoc path2AliasMapping)
33   {
34     appendOpenBrackets(result);
35     result.append(_bracket);
36     appendCloseBrackets(result);
37   }
38
39   public String JavaDoc getBracket()
40   {
41     return _bracket;
42   }
43
44   public void setBracket(String JavaDoc string)
45   {
46     _bracket = string;
47   }
48
49 }
Popular Tags