org.millscript.millscript.loaders
Class BasicTemplateLoader

java.lang.Object
  extended by org.millscript.millscript.loaders.Loader
      extended by org.millscript.millscript.loaders.ValueLoader
          extended by org.millscript.millscript.loaders.ExprLoader
              extended by org.millscript.millscript.loaders.BasicTemplateLoader
All Implemented Interfaces:
org.millscript.commons.alert.AlertOrigin
Direct Known Subclasses:
BasicXHTMLTemplateLoader, XMLSkeletonLoader, XMLTemplateLoader

public abstract class BasicTemplateLoader
extends ExprLoader

This class is a starting point for implementing a general XML template loader. It allows specific sub-classes to customize the loading process for custom tags and attributes.


Field Summary
 
Fields inherited from class org.millscript.millscript.loaders.Loader
entry, pack, symbol
 
Method Summary
abstract  Expr compAttributeValue(java.lang.String value)
          Returns the compiled attribute value.
 void compileEndTag(org.millscript.commons.xml.api.token.EndTagToken token)
          Performs any required steps to compile the specified end tag.
 void compileStartTag(org.millscript.commons.xml.api.token.StartTagToken token)
          Performs any required steps to compile the specified start tag.
 Expr compSpecialString(java.lang.String s)
          Returns the compiled special string.
 Expr loadExpr()
          Causes this loader to load it's expression.
abstract  Expr makeLambda(java.lang.String theName, Expr body)
          Returns a lambda expression for the specified name and body.
 
Methods inherited from class org.millscript.millscript.loaders.ExprLoader
loadValue
 
Methods inherited from class org.millscript.millscript.loaders.ValueLoader
loadBindings
 
Methods inherited from class org.millscript.millscript.loaders.Loader
getInstance, getLineNumber, getOrigin, getSymbol, newLoader, setContext, setLineNumber, setLoader, setOrigin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compAttributeValue

public abstract Expr compAttributeValue(java.lang.String value)
Returns the compiled attribute value.

Parameters:
value - attribute value
Returns:
an Expr compiled from the specified attribute value

compileEndTag

public void compileEndTag(org.millscript.commons.xml.api.token.EndTagToken token)
Performs any required steps to compile the specified end tag.

Parameters:
token - the end tag token to compile

compileStartTag

public void compileStartTag(org.millscript.commons.xml.api.token.StartTagToken token)
Performs any required steps to compile the specified start tag.

Parameters:
token - the start tag token to compile

compSpecialString

public final Expr compSpecialString(java.lang.String s)
Returns the compiled special string. A special string, is considered to be normal MillScript, except that hash marks replace normal string quotes.

Parameters:
s - the string to compile
Returns:
an Expr compiled from the specified string

loadExpr

public Expr loadExpr()
Description copied from class: ExprLoader
Causes this loader to load it's expression.

Specified by:
loadExpr in class ExprLoader
Returns:
the expression that was loaded
See Also:
ExprLoader.loadExpr()

makeLambda

public abstract Expr makeLambda(java.lang.String theName,
                                Expr body)
Returns a lambda expression for the specified name and body.

Parameters:
theName - the name for lambda expression
body - the body expression for the lambda expression
Returns:
an Expr


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.