public class CompositeCssCompressor extends Object implements IScopeAwareTextResourceProcessor, ICssCompressor
ICssCompressor
to the CSS compression.CompositeCssCompressor compositeCssCompressor = new CompositeCssCompressor(); compositeCssCompressor.add(new MyCssCompressor()); compositeCssCompressor.add(new AnotherCssCompressor()); this.getResourceSettings().setCssCompressor(compositeCssCompressor);The compressors can also be given as constructor arguments.
Constructor and Description |
---|
CompositeCssCompressor(ICssCompressor... compressors)
Initializes the composite CSS compressor with the given
ICssCompressor (s) |
Modifier and Type | Method and Description |
---|---|
CompositeCssCompressor |
add(ICssCompressor compressor)
Adds a ICssCompressor to the list of delegates.
|
String |
compress(String original)
Remove comments and white spaces from the text resource
|
String |
process(String input,
Class<?> scope,
String name)
Compresses the given original content in the order of compressors.
|
public CompositeCssCompressor(ICssCompressor... compressors)
ICssCompressor
(s)compressors
- The ICssCompressor
(s) this composite CSS compressor is initialized withpublic String process(String input, Class<?> scope, String name)
process
in interface IScopeAwareTextResourceProcessor
input
- The original input to processscope
- The scope class of the package resourcename
- The name of the package resourcepublic String compress(String original)
ITextResourceCompressor
compress
in interface ITextResourceCompressor
public CompositeCssCompressor add(ICssCompressor compressor)
this
instance, for chainingCopyright © 2006–2022 Apache Software Foundation. All rights reserved.