spoon.template |
This package defines a framework for well-typed pure-Java templates.
A template is a regular Java class that implements the {@link spoon.template.Template} interface and
that contains some template parameters.
Related Documentation
|
Java Source File Name | Type | Comment |
BlockTemplateParameter.java | Class | This class represents a template parameter that defines a void block
statement directly expressed in Java (no returns). |
ExpressionTemplateParameter.java | Class | This class represents an expression template parameter expressed in Java.
To define a new expression template parameter, you must subclass this class
and implement the
ExpressionTemplateParameter.expression() method, which actually defines the
Java expression. |
Local.java | Annotation | This annotation should be placed on templates' members to indicate that they
are local elements of the template class. |
Parameter.java | Annotation | This annotation should be placed on templates' fields or methods to indicate
that they represent template parameters. |
StatementListTemplateParameter.java | Class | This class represents a template parameter that defines a statement list
directly expressed in Java (no returns).
To define a new statement list template parameter, you must subclass this
class and implement the
StatementListTemplateParameter.statements() method, which actually defines
the Java statements. |
Substitution.java | Class | This class defines the substitution API for templates (see
Template ). |
Template.java | Interface | This maker interface should be implemented by the classes containing some
template code, so that they can be used as template parameter values holder
for the
Substitution methods.
A template code is simply a piece of code that uses a
TemplateParameter 's instance. |
TemplateException.java | Class | This runtime exception can be throws when something wrong occurs in template
operations such as loading, subtitution, and matching. |
TemplateMatcher.java | Class | This class defines an engine for matching a template to pieces of code. |
TemplateParameter.java | Interface | This interface defines a typed template parameter. |
TemplateParameterList.java | Interface | This interface defines a list of template parameters that is used to model a
list of statements. |
TypedBlockTemplateParameter.java | Class | This class represents a template parameter that defines a block statement
directly expressed in Java (must return an expression of type R ). |
TypedStatementListTemplateParameter.java | Class | This class represents a template parameter that defines a statement list
directly expressed in Java (the statement list ends with a return statement
returning a expression of type R ).
To define a new statement list template parameter, you must subclass this
class and implement the
TypedStatementListTemplateParameter.statements() method, which actually defines
the Java statements. |