KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > parsec > Token2String


1 /*****************************************************************************
2  * Copyright (C) Zephyr Business Solutions Corp. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  *****************************************************************************/

8 /*
9  * Created on 2004-11-13
10  *
11  * Author Ben Yu
12  */

13 package jfun.parsec;
14
15
16 /**
17  * Default ShowToken implementation that uses toString() to convert.
18  * @author Ben Yu
19  *
20  * 2004-11-13
21  */

22 public final class Token2String implements ShowToken,
23 java.io.Serializable JavaDoc{
24   private static final ShowToken singleton = new Token2String();
25   public String JavaDoc show(final Object JavaDoc t){return t.toString();}
26   public static ShowToken instance(){return singleton;}
27 }
28
Popular Tags