|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.plovr.AbstractJsInput
org.plovr.ResourceJsInput
public class ResourceJsInput
ResourceJsInput
represents a JavaScript file loaded from a JAR, so
it will never change, so its dependencies must only be read once.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.plovr.JsInput |
---|
JsInput.CodeWithEtag |
Field Summary |
---|
Fields inherited from class org.plovr.AbstractJsInput |
---|
provides, requires |
Method Summary | |
---|---|
java.lang.String |
getCode()
|
JsInput.CodeWithEtag |
getCodeWithEtag()
If JsInput.supportsEtags() returns true , then this returns the
value returned by JsInput.getCode() along with an ETag; otherwise, it
throws an UnsupportedOperationException . |
boolean |
supportsEtags()
Whether this input can calculate a stable ETag value for itself. |
Methods inherited from class org.plovr.AbstractJsInput |
---|
calculateEtagFor, getName, getProvides, getRequires, getTemplateCode, hasInputChanged, isSoyFile, processProvidesAndRequires, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public JsInput.CodeWithEtag getCodeWithEtag()
JsInput
JsInput.supportsEtags()
returns true
, then this returns the
value returned by JsInput.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 JsInput.getCode()
and then
again to read the code and calculate its ETag. This ensures that the code
and ETag are produced atomically.
getCodeWithEtag
in interface JsInput
getCodeWithEtag
in class AbstractJsInput
public java.lang.String getCode()
getCode
in interface com.google.javascript.jscomp.SourceFile.Generator
getCode
in interface JsInput
getCode
in class AbstractJsInput
public boolean supportsEtags()
JsInput
supportsEtags
in interface JsInput
supportsEtags
in class AbstractJsInput
JsInput.getCodeWithEtag()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |