org.rythmengine.internal.dialect
Class ToString

java.lang.Object
  extended by org.rythmengine.internal.dialect.DialectBase
      extended by org.rythmengine.internal.dialect.SimpleRythm
          extended by org.rythmengine.internal.dialect.ToString
All Implemented Interfaces:
IDialect
Direct Known Subclasses:
AutoToString

public class ToString
extends SimpleRythm

ToString mode is a very limited subset of Rythm which has only basic Rythm features:

Specifically, argument declaration and scripting is disabled in ToString mode; @for loop is not allowed in ToString mode also


Field Summary
static String ID
           
static IDialect INSTANCE
           
protected  Class type
           
 
Constructor Summary
protected ToString()
           
  ToString(Class type)
           
 
Method Summary
 String a()
          Return the primary caret marker, e.g.
 void begin(IContext ctx)
           
 boolean enableScripting()
           
 String id()
          Return the ID of the dialect, might be something like "rythm" or "play-groovy" etc.
 boolean isMyTemplate(String template)
           
 
Methods inherited from class org.rythmengine.internal.dialect.SimpleRythm
buildInParserClasses
 
Methods inherited from class org.rythmengine.internal.dialect.DialectBase
createBuildInParser, createCodeBuilder, enableFreeForLoop, end, equals, freeParsers, hashCode, registerParserFactory, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values

INSTANCE

public static final IDialect INSTANCE

type

protected Class type
Constructor Detail

ToString

protected ToString()

ToString

public ToString(Class type)
Method Detail

id

public String id()
Description copied from interface: IDialect
Return the ID of the dialect, might be something like "rythm" or "play-groovy" etc.

Specified by:
id in interface IDialect
Overrides:
id in class SimpleRythm
Returns:
dialect id

a

public String a()
Description copied from interface: IDialect
Return the primary caret marker, e.g. "#" in play-groovy, "@" in rythm and "`" in japid. To escape the marker repeat the marker twice, e.g. "@@", "##", "``"

Specified by:
a in interface IDialect
Overrides:
a in class SimpleRythm
Returns:
the primary caret

isMyTemplate

public boolean isMyTemplate(String template)
Specified by:
isMyTemplate in interface IDialect
Overrides:
isMyTemplate in class SimpleRythm

enableScripting

public boolean enableScripting()
Specified by:
enableScripting in interface IDialect
Overrides:
enableScripting in class DialectBase

begin

public void begin(IContext ctx)
Specified by:
begin in interface IDialect
Overrides:
begin in class SimpleRythm


Copyright © 2014. All Rights Reserved.