01: /* Generated by Together */
02:
03: package com.rimfaxe.xml.xmlreader.xpath;
04:
05: /** A '.' node test.
06: * This is part of the GoF Flyweight(195) pattern -- Only one object of
07: * this class ever exists, shared amongst all clients.
08: * You use INSTANCE instead of the constructor to get
09: * that object.
10:
11: <blockquote><small> Copyright (C) 2002 Hewlett-Packard Company.
12: This file is part of Sparta, an XML Parser, DOM, and XPath library.
13: This library is free software; you can redistribute it and/or
14: modify it under the terms of the <a href="doc-files/LGPL.txt">GNU
15: Lesser General Public License</a> as published by the Free Software
16: Foundation; either version 2.1 of the License, or (at your option)
17: any later version. This library is distributed in the hope that it
18: will be useful, but WITHOUT ANY WARRANTY; without even the implied
19: warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20: PURPOSE. </small></blockquote>
21: @version $Date: 2002/12/06 23:41:18 $ $Revision: 1.2 $
22: @author Eamonn O'Brien-Strain
23: */
24: public class ThisNodeTest extends NodeTest {
25:
26: //only need one of them => GoF Flyweight Pattern(195)
27: private ThisNodeTest() {
28: }
29:
30: static final ThisNodeTest INSTANCE = new ThisNodeTest();
31:
32: public void accept(Visitor visitor) {
33: visitor.visit(this );
34: }
35:
36: /** Return false*/
37: public boolean isStringValue() {
38: return false;
39: }
40:
41: public String toString() {
42: return ".";
43: }
44: }
45:
46: // $Log: ThisNodeTest.java,v $
47: // Revision 1.2 2002/12/06 23:41:18 eobrain
48: // Make objects that are always the same follow the Flyweight Pattern.
49: //
50: // Revision 1.1.1.1 2002/08/19 05:04:03 eobrain
51: // import from HP Labs internal CVS
52: //
53: // Revision 1.3 2002/08/18 23:39:10 eob
54: // Add copyright and other formatting and commenting in preparation for
55: // release to SourceForge.
56: //
57: // Revision 1.2 2002/06/14 19:41:56 eob
58: // Make test for isStringValue more object-oriented. Avoid "instanceof".
59: //
60: // Revision 1.1 2002/02/01 02:50:18 eob
61: // initial
|