|
|||||||||
| 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()
JsInputJsInput.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 JsInputgetCodeWithEtag in class AbstractJsInputpublic java.lang.String getCode()
getCode in interface com.google.javascript.jscomp.SourceFile.GeneratorgetCode in interface JsInputgetCode in class AbstractJsInputpublic boolean supportsEtags()
JsInput
supportsEtags in interface JsInputsupportsEtags in class AbstractJsInputJsInput.getCodeWithEtag()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||