|
|||||||||
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 | |
---|---|
java.lang.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 . |
java.lang.String |
getName()
|
java.util.List<java.lang.String> |
getProvides()
|
java.util.List<java.lang.String> |
getRequires()
|
java.lang.String |
getTemplateCode()
|
boolean |
isSoyFile()
|
boolean |
supportsEtags()
Whether this input can calculate a stable ETag value for itself. |
Method Detail |
---|
java.lang.String getName()
JsInput
must be unique among the other inputs
included in a compilation so that warnings and errors can be reported
appropriately.java.lang.String getCode()
getCode
in interface com.google.javascript.jscomp.SourceFile.Generator
java.util.List<java.lang.String> getProvides()
java.util.List<java.lang.String> getRequires()
boolean isSoyFile()
getTemplateCode()
must return the original Soy content.java.lang.String getTemplateCode()
java.lang.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 |