com.asual.lesscss.loader
Class CssProcessingResourceLoader
java.lang.Object
com.asual.lesscss.loader.CssProcessingResourceLoader
- All Implemented Interfaces:
- ResourceLoader
public class CssProcessingResourceLoader
- extends Object
- implements ResourceLoader
A ResourceLoader that allows using lesscss @include in plain .css
files.
Multiple levels of nesting are achieved by combining these two actions:
- When a resource is loaded all .css strings are replaced with .less
- When a .less include file is requested and it does not exist, the
extension is changed to .css and lookup is retried.
- Author:
- RafaĆ Krzewski
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CssProcessingResourceLoader
public CssProcessingResourceLoader(ResourceLoader delegate)
exists
public boolean exists(String path)
throws IOException
- Description copied from interface:
ResourceLoader
- Checks if the given resource exists.
- Specified by:
exists in interface ResourceLoader
- Parameters:
path - resource path.
- Returns:
true if the resource exists.
- Throws:
IOException - when i/o error occurs while checking for resource existence.
load
public String load(String path,
String charset)
throws IOException
- Description copied from interface:
ResourceLoader
- Loads the given resource's contents.
- Specified by:
load in interface ResourceLoader
- Parameters:
path - resource path.charset - character set name, valid with respect to
Charset.
- Returns:
- resource contents as a string.
- Throws:
IOException - when i/o error occurs while loading the resource, or charset
is invalid.
Copyright © 2013 Asual DZZD. All Rights Reserved.