KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > codegen > jet > JETExpressionGenerator


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: JETExpressionGenerator.java,v 1.2 2005/06/08 06:15:56 nickb Exp $
16  */

17 package org.eclipse.emf.codegen.jet;
18
19
20
21 /**
22  * Generator to deal with JSP expressions: <%= ... %> stuff.
23  */

24 public class JETExpressionGenerator
25   extends JETScriptletGenerator
26 {
27   protected static final String JavaDoc FUNCTION_CALL_BEGIN = "stringBuffer.append(";
28   protected static final String JavaDoc FUNCTION_CALL_END = ");";
29
30   public JETExpressionGenerator(char[] chars)
31   {
32     super(chars);
33   }
34
35   public String JavaDoc generate()
36   {
37     StringBuffer JavaDoc stringBuffer = new StringBuffer JavaDoc(FUNCTION_CALL_BEGIN);
38     stringBuffer.append(super.generate());
39     stringBuffer.append(FUNCTION_CALL_END);
40     return stringBuffer.toString();
41   }
42 }
43
Popular Tags