com.metaweb.lessen.tokenizers
Class UrlRewritingTokenizer
java.lang.Object
com.metaweb.lessen.tokenizers.UrlRewritingTokenizer
- All Implemented Interfaces:
- Tokenizer
public class UrlRewritingTokenizer
- extends Object
- implements Tokenizer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_tokenizer
protected final Tokenizer _tokenizer
_relativePath
protected final String _relativePath
_segments
protected final String[] _segments
_token
protected Token _token
UrlRewritingTokenizer
public UrlRewritingTokenizer(Tokenizer tokenizer,
String relativePath)
- relativePath specifies how to get from the output CSS's URL to
the input CSS's URL. For example, say the input CSS is served at
some-path/modules/foo/styles/detail-page.css
which is to be bundled with other CSS files to produce a CSS
bundle to be served at
some-path/bundles/foo.css
then the relative path is
../modules/foo/styles/
because from foo.css, we need to go up one directory level to
some-path, and then down modules/foo/styles/ to get to
detail-page.css. If detail-page.css contains
url(../images/watermark.png)
then it'll be resolved to
url(../modules/foo/images/watermark.png)
in foo.css so that foo.css effectively references the same image.
- Parameters:
tokenizer - relativePath -
getToken
public Token getToken()
- Specified by:
getToken in interface Tokenizer
next
public void next()
- Specified by:
next in interface Tokenizer
resolve
protected void resolve()
Copyright © 2011. All Rights Reserved.