com.force.sdk.codegen.template
Interface Template

All Known Implementing Classes:
StringTemplateWrapper

public interface Template

A representation of the physical layout of generated code.

A Template class defines what the generated code should look like. It can accept injected state and use that state to dynamically generate source code.

Author:
Tim Kral

Method Summary
 void injectView(String viewName, Object viewState)
          Inject view state into a Template.
 void reset()
          Removes all previously injected view state from a Template.
 void write(Writer writer)
          Writes a Template along with any injected view state to the given Writer.
 

Method Detail

injectView

void injectView(String viewName,
                Object viewState)
Inject view state into a Template.

A Template should recognize view state by a name. Thereforce, this method will inject the given view state object for the given name.

Parameters:
viewName - the name of the view state
viewState - the view state object

reset

void reset()
Removes all previously injected view state from a Template.


write

void write(Writer writer)
           throws IOException
Writes a Template along with any injected view state to the given Writer.

Parameters:
writer - a Java Writer to which the Template and its view state should be written
Throws:
IOException - if there is an error writing to the Java Writer


Copyright © 2011. All Rights Reserved.