cn.dreampie.coffeescript.compiler
类 CoffeeSource

java.lang.Object
  继承者 cn.dreampie.coffeescript.compiler.CoffeeSource

public class CoffeeSource
extends Object

Created by wangrenhui on 2014/7/11.


构造方法摘要
CoffeeSource(File input)
          Simple helper method to handle simple files.
CoffeeSource(cn.dreampie.resource.Resource resource)
          Constructs a new CoffeeSource.
CoffeeSource(cn.dreampie.resource.Resource resource, Charset charset)
          Constructs a new CoffeeSource.
 
方法摘要
 String getAbsolutePath()
          Returns the absolute pathname of the LESS source.
 String getContent()
          Returns the content of the LESS source.
 long getLastModified()
          Returns the time that the LESS source was last modified.
 String getName()
           
 String getNormalizedContent()
          Returns the normalized content of the LESS source.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

CoffeeSource

public CoffeeSource(cn.dreampie.resource.Resource resource)
             throws IOException
Constructs a new CoffeeSource.

This will read the metadata and content of the LESS source, and will automatically resolve the imports.

The resource is read using the default Charset of the platform

参数:
resource - The File reference to the LESS source to read.
抛出:
FileNotFoundException - If the LESS source (or one of its imports) could not be found.
IOException - If the LESS source cannot be read.

CoffeeSource

public CoffeeSource(cn.dreampie.resource.Resource resource,
                    Charset charset)
             throws IOException
Constructs a new CoffeeSource.

This will read the metadata and content of the LESS resource, and will automatically resolve the imports.

参数:
resource - The File reference to the LESS resource to read.
charset - charset used to read the less resource.
抛出:
FileNotFoundException - If the LESS resource (or one of its imports) could not be found.
IOException - If the LESS resource cannot be read.

CoffeeSource

public CoffeeSource(File input)
             throws IOException
Simple helper method to handle simple files. This delegates to @see #CoffeeSource(Resource) .

参数:
input - a File to use as input.
抛出:
IOException - read file exception
方法详细信息

getAbsolutePath

public String getAbsolutePath()
Returns the absolute pathname of the LESS source.

返回:
The absolute pathname of the LESS source.

getContent

public String getContent()
Returns the content of the LESS source.

返回:
The content of the LESS source.

getNormalizedContent

public String getNormalizedContent()
Returns the normalized content of the LESS source.

The normalized content represents the LESS source as a flattened source where import statements have been resolved and replaced by the actual content.

返回:
The normalized content of the LESS source.

getLastModified

public long getLastModified()
Returns the time that the LESS source was last modified.

返回:
A long value representing the time the resource was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970).

getName

public String getName()


Copyright © 2014. All rights reserved.