public class DefaultTwirlSourceSet extends Object implements TwirlSourceSet
| Constructor and Description |
|---|
DefaultTwirlSourceSet(String name,
String displayName,
ObjectFactory objectFactory) |
| Modifier and Type | Method and Description |
|---|---|
ListProperty<String> |
getAdditionalImports()
Returns the list of additional imports to add to the generated Scala code.
|
ListProperty<String> |
getConstructorAnnotations()
Gets the list of construtor annotations to support dependency injection
|
Property<TwirlImports> |
getDefaultImports()
The default imports that should be added to generated source files.
|
SourceDirectorySet |
getTwirl()
Returns the source directory set.
|
ListProperty<TwirlTemplateFormat> |
getUserTemplateFormats()
Returns the custom template formats configured for this source set.
|
TwirlTemplateFormat |
newUserTemplateFormat(String extension,
String templateType,
String... imports)
Creates a new custom template format.
|
TwirlSourceSet |
twirl(Action<? super SourceDirectorySet> configureAction)
Configures the source set.
|
@Inject public DefaultTwirlSourceSet(String name, String displayName, ObjectFactory objectFactory)
public SourceDirectorySet getTwirl()
TwirlSourceSetgetTwirl in interface TwirlSourceSetpublic TwirlSourceSet twirl(Action<? super SourceDirectorySet> configureAction)
TwirlSourceSettwirl in interface TwirlSourceSetconfigureAction - The configuration actionpublic Property<TwirlImports> getDefaultImports()
TwirlSourceSetgetDefaultImports in interface TwirlSourceSetpublic ListProperty<TwirlTemplateFormat> getUserTemplateFormats()
TwirlSourceSetgetUserTemplateFormats in interface TwirlSourceSetpublic TwirlTemplateFormat newUserTemplateFormat(String extension, String templateType, String... imports)
TwirlSourceSetnewUserTemplateFormat in interface TwirlSourceSetextension - The file extension this template applies to (e.g., html)templateType - Fully-qualified type for this template formatimports - Additional imports to add for the custom template formatpublic ListProperty<String> getAdditionalImports()
TwirlSourceSetgetAdditionalImports in interface TwirlSourceSetpublic ListProperty<String> getConstructorAnnotations()
TwirlSourceSetgetConstructorAnnotations in interface TwirlSourceSet