ro.isdc.wro.model.transformer
Class WildcardExpanderModelTransformer
java.lang.Object
ro.isdc.wro.model.transformer.WildcardExpanderModelTransformer
- All Implemented Interfaces:
- Transformer<WroModel>
public class WildcardExpanderModelTransformer
- extends Object
- implements Transformer<WroModel>
A decorator which looks up for resources containing wildcards and replaces them with the corresponding collection of
specific resources. For example, a resource of this type:
<js>/path/to/**.js</js>
can be transformed into:
<js>/path/to/a1.js</js>
<js>/path/to/a2.js</js>
<js>/path/to/a3.js</js>
This model transformation is also known as wildcard expander, because it mutates the model after it is built by
adding resources to the group which contains resources with wildcard uri.
- Since:
- 1.4.0
- Author:
- Alex Objelean
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WildcardExpanderModelTransformer
public WildcardExpanderModelTransformer()
transform
public WroModel transform(WroModel input)
- Apply a transformation on the input object.
- Specified by:
transform
in interface Transformer<WroModel>
- Parameters:
input
- the object to transform.
- Returns:
- the transformed object.
createExpanderHandler
public Function<Collection<File>,Void> createExpanderHandler(Group group,
Resource resource,
String baseNameFolder)
- create the handler which expand the resources containing wildcard.
Copyright © 2008-2013. All Rights Reserved.