ro.isdc.wro.model.resource.processor.support
Class CssImportInspector
java.lang.Object
ro.isdc.wro.model.resource.processor.support.CssImportInspector
- Direct Known Subclasses:
- LessCssImportInspector
public class CssImportInspector
- extends Object
Encapsulates the matcher creation for css import statements detection. Useful to isolate unit tests. TODO prefer a
fluent interface implementation for this class.
- Since:
- 1.6.3
- Author:
- Alex Objelean
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CssImportInspector
public CssImportInspector(String cssContent)
getMatcher
protected Matcher getMatcher(String cssContent)
- Returns:
- a
Matcher
for the processed content using the regexp responsible for identifying css import
statements.
removeImportStatements
public final String removeImportStatements()
- Removes all @import statements from css.
containsImport
public final boolean containsImport()
- Returns:
- true if checked css content contains an @import statement.
findImports
public final List<String> findImports()
- Returns:
- a list of all resources imported using @import statement.
extractImportUrl
protected String extractImportUrl(Matcher matcher)
- Override this method to provide a custom way of extracting the imported resource url.
- Parameters:
matcher
- the Matcher
inspecting the parsed css content.
- Returns:
- the url of the imported resources.
Copyright © 2008-2013. All Rights Reserved.