Package spoon.template
Class AbstractTemplate<T extends CtElement>
java.lang.Object
spoon.template.AbstractTemplate<T>
- All Implemented Interfaces:
Template<T>
- Direct Known Subclasses:
BlockTemplate
,ExpressionTemplate
,ExtensionTemplate
,StatementTemplate
handles the well-formedness and helper methods of templates
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddGeneratedBy(boolean addGeneratedBy)
returns a Spoon factory object from the first template parameter that contains oneboolean
boolean
isValid()
verifies whether all template parameters are filled.boolean
verifies whether there is at least one template parameter.boolean
if true, the result of the template evaluation is simplified with partial evaluation
-
Constructor Details
-
AbstractTemplate
public AbstractTemplate()
-
-
Method Details
-
withPartialEvaluation
public boolean withPartialEvaluation()Description copied from interface:Template
if true, the result of the template evaluation is simplified with partial evaluation- Specified by:
withPartialEvaluation
in interfaceTemplate<T extends CtElement>
-
isWellFormed
public boolean isWellFormed()verifies whether there is at least one template parameter. -
isValid
public boolean isValid()verifies whether all template parameters are filled. -
getFactory
returns a Spoon factory object from the first template parameter that contains one -
isAddGeneratedBy
public boolean isAddGeneratedBy()- Returns:
- true if the template engine adds Generated by ... comments into generated code
-
addGeneratedBy
- Parameters:
addGeneratedBy
- if true the template engine will add Generated by ... comments into generated code
-