Package kawa.lang
Class SyntaxTemplate
- java.lang.Object
-
- kawa.lang.SyntaxTemplate
-
- All Implemented Interfaces:
Externalizable
,Serializable
- Direct Known Subclasses:
SyntaxRule
public class SyntaxTemplate extends Object implements Externalizable
The translated form of a(syntax template)
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static SimpleSymbol
dots3Symbol
-
Constructor Summary
Constructors Modifier Constructor Description protected
SyntaxTemplate()
SyntaxTemplate(Object template, SyntaxForm syntax, Object ellipsis, Translator tr)
SyntaxTemplate(String patternNesting, String template_program, Object[] literal_values, int max_nesting)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
execute(Object[] vars, TemplateScope templateScope)
Expand this template The compiler translates(syntax template)
to a call to this method.Object
execute(Object[] vars, Translator tr)
void
readExternal(ObjectInput in)
void
writeExternal(ObjectOutput out)
-
-
-
Field Detail
-
dots3Symbol
public static final SimpleSymbol dots3Symbol
-
-
Constructor Detail
-
SyntaxTemplate
protected SyntaxTemplate()
-
SyntaxTemplate
public SyntaxTemplate(String patternNesting, String template_program, Object[] literal_values, int max_nesting)
-
SyntaxTemplate
public SyntaxTemplate(Object template, SyntaxForm syntax, Object ellipsis, Translator tr)
-
-
Method Detail
-
execute
public Object execute(Object[] vars, TemplateScope templateScope)
Expand this template The compiler translates(syntax template)
to a call to this method.
-
execute
public Object execute(Object[] vars, Translator tr)
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
-