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()
TwirlSourceSet
getTwirl
in interface TwirlSourceSet
public TwirlSourceSet twirl(Action<? super SourceDirectorySet> configureAction)
TwirlSourceSet
twirl
in interface TwirlSourceSet
configureAction
- The configuration actionpublic Property<TwirlImports> getDefaultImports()
TwirlSourceSet
getDefaultImports
in interface TwirlSourceSet
public ListProperty<TwirlTemplateFormat> getUserTemplateFormats()
TwirlSourceSet
getUserTemplateFormats
in interface TwirlSourceSet
public TwirlTemplateFormat newUserTemplateFormat(String extension, String templateType, String... imports)
TwirlSourceSet
newUserTemplateFormat
in interface TwirlSourceSet
extension
- 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()
TwirlSourceSet
getAdditionalImports
in interface TwirlSourceSet
public ListProperty<String> getConstructorAnnotations()
TwirlSourceSet
getConstructorAnnotations
in interface TwirlSourceSet