Package kawa.lang

Class SyntaxTemplate

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable
    Direct Known Subclasses:
    SyntaxRule

    public class SyntaxTemplate
    extends java.lang.Object
    implements java.io.Externalizable
    The translated form of a (syntax template).
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SyntaxTemplate()  
        SyntaxTemplate​(java.lang.Object template, SyntaxForm syntax, java.lang.Object ellipsis, Translator tr)  
        SyntaxTemplate​(java.lang.String patternNesting, java.lang.String template_program, java.lang.Object[] literal_values, int max_nesting)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object execute​(java.lang.Object[] vars, TemplateScope templateScope)
      Expand this template The compiler translates (syntax template) to a call to this method.
      java.lang.Object execute​(java.lang.Object[] vars, Translator tr)  
      void readExternal​(java.io.ObjectInput in)  
      void writeExternal​(java.io.ObjectOutput out)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • SyntaxTemplate

        protected SyntaxTemplate()
      • SyntaxTemplate

        public SyntaxTemplate​(java.lang.String patternNesting,
                              java.lang.String template_program,
                              java.lang.Object[] literal_values,
                              int max_nesting)
      • SyntaxTemplate

        public SyntaxTemplate​(java.lang.Object template,
                              SyntaxForm syntax,
                              java.lang.Object ellipsis,
                              Translator tr)
    • Method Detail

      • execute

        public java.lang.Object execute​(java.lang.Object[] vars,
                                        TemplateScope templateScope)
        Expand this template The compiler translates (syntax template) to a call to this method.
      • execute

        public java.lang.Object execute​(java.lang.Object[] vars,
                                        Translator tr)
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException