|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface JsInput
JsInput represents a JavaScript input to the Closure Compiler.
| Nested Class Summary | |
|---|---|
static class |
JsInput.CodeWithEtag
|
| Method Summary | |
|---|---|
String |
getCode()
|
JsInput.CodeWithEtag |
getCodeWithEtag()
If supportsEtags() returns true, then this returns the
value returned by getCode() along with an ETag; otherwise, it
throws an UnsupportedOperationException. |
String |
getName()
|
List<String> |
getProvides()
|
List<String> |
getRequires()
|
String |
getTemplateCode()
|
boolean |
isSoyFile()
|
boolean |
supportsEtags()
Whether this input can calculate a stable ETag value for itself. |
| Method Detail |
|---|
String getName()
JsInput must be unique among the other inputs
included in a compilation so that warnings and errors can be reported
appropriately.String getCode()
getCode in interface SourceFile.GeneratorList<String> getProvides()
List<String> getRequires()
boolean isSoyFile()
getTemplateCode() must return the original Soy content.String getTemplateCode()
UnsupportedOperationException - if this is not a Soy fileboolean supportsEtags()
getCodeWithEtag()JsInput.CodeWithEtag getCodeWithEtag()
supportsEtags() returns true, then this returns the
value returned by getCode() along with an ETag; otherwise, it
throws an UnsupportedOperationException.
This is generally used as a performance optimization to prevent plovr from
going to disk twice: once to read the code for getCode() and then
again to read the code and calculate its ETag. This ensures that the code
and ETag are produced atomically.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||