org.teatrove.tea.runtime
Interface TemplateLoader.Template

All Known Subinterfaces:
Template
Enclosing class:
TemplateLoader

public static interface TemplateLoader.Template

A ready-to-use Tea template.

Version:
Author:
Brian S O'Neill

Method Summary
 void execute(Context context, Object[] parameters)
          Executes this template using the given runtime context instance and parameters.
 Class<?> getContextType()
          Returns the type of runtime context that this template accepts.
 String getName()
          Returns the full name of this template.
 String[] getParameterNames()
          Returns the parameter names that this template accepts.
 Class<?>[] getParameterTypes()
          Returns the parameter types that this template accepts.
 Class<?> getTemplateClass()
          Returns the class that defines this template.
 TemplateLoader getTemplateLoader()
           
 String toString()
          Returns the template signature.
 

Method Detail

getTemplateLoader

TemplateLoader getTemplateLoader()

getName

String getName()
Returns the full name of this template.


getTemplateClass

Class<?> getTemplateClass()
Returns the class that defines this template.


getContextType

Class<?> getContextType()
Returns the type of runtime context that this template accepts.

See Also:
Context

getParameterNames

String[] getParameterNames()
Returns the parameter names that this template accepts. The length of the returned array is the same as returned by getParameterTypes. If any template parameter names is unknown, the array entry is null.


getParameterTypes

Class<?>[] getParameterTypes()
Returns the parameter types that this template accepts. The length of the returned array is the same as returned by getParameterNames.


execute

void execute(Context context,
             Object[] parameters)
             throws Exception
Executes this template using the given runtime context instance and parameters.

Parameters:
context - Must be assignable to the type returned by getContextType().
parameters - Must have same length and types as returned by getParameterTypes().
Throws:
Exception

toString

String toString()
Returns the template signature.

Overrides:
toString in class Object


Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.