001 /** 002 * Comma token singleton 003 * 004 * @author Mathias Ricken 005 */ 006 package sysModel.parser; 007 008 /** 009 * Comma token. 010 * 011 * @author Mathias Ricken 012 */ 013 public final class CommaToken implements IToken { 014 /** 015 * Singleton instance. 016 */ 017 private static CommaToken _instance; 018 019 /** 020 * Return singleton instance. 021 * 022 * @return instance 023 */ 024 public static synchronized CommaToken instance() { 025 if (null == _instance) { 026 _instance = new CommaToken(); 027 } 028 return _instance; 029 } 030 031 /** 032 * Private singleton constructor. 033 */ 034 private CommaToken() { 035 } 036 037 /** 038 * Execute visitor. 039 * 040 * @param v visitor 041 * @return visitor-specific return value 042 */ 043 public final Object execute(ITokenVisitor v) { 044 return v.commaCase(); 045 } 046 } 047