org.plovr
Interface JsInput

All Superinterfaces:
SourceFile.Generator
All Known Implementing Classes:
AbstractJsInput, CoffeeFile, JsSourceFile, LocalFileJsInput, ResourceJsInput, SoyFile

public interface JsInput
extends SourceFile.Generator

JsInput represents a JavaScript input to the Closure Compiler.

Author:
bolinfest@gmail.com (Michael Bolin)

Method Summary
 String getCode()
           
 String getName()
           
 List<String> getProvides()
           
 List<String> getRequires()
           
 String getTemplateCode()
           
 boolean isSoyFile()
           
 

Method Detail

getName

String getName()
Returns:
name of a JsInput must be unique among the other inputs included in a compilation so that warnings and errors can be reported appropriately.

getCode

String getCode()
Specified by:
getCode in interface SourceFile.Generator
Returns:
JavaScript code

getProvides

List<String> getProvides()
Returns:
a list of the values passed to goog.provide() in this input

getRequires

List<String> getRequires()
Returns:
a list of the values passed to goog.require() in this input

isSoyFile

boolean isSoyFile()
Returns:
a boolean indicating whether this is a Soy file. If true, then getTemplateCode() must return the original Soy content.

getTemplateCode

String getTemplateCode()
Returns:
the underlying template code if this is a Soy file
Throws:
UnsupportedOperationException - if this is not a Soy file