public class JavaScriptReferenceHeaderItem extends AbstractJavaScriptReferenceHeaderItem implements IReferenceHeaderItem
HeaderItem
for script tags that are rendered using a ResourceReference
.Constructor and Description |
---|
JavaScriptReferenceHeaderItem(ResourceReference reference,
PageParameters pageParameters,
String id,
boolean defer,
String charset,
String condition)
Creates a new
JavaScriptReferenceHeaderItem . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List<HeaderItem> |
getDependencies() |
PageParameters |
getPageParameters() |
Iterable<? extends HeaderItem> |
getProvidedResources() |
ResourceReference |
getReference() |
Iterable<?> |
getRenderTokens() |
int |
hashCode() |
void |
render(Response response)
Renders the
HeaderItem to the response. |
String |
toString() |
getCharset, isAsync, isDefer, setAsync, setCharset, setDefer
forReference, forReference, forReference, forReference, forReference, forReference, forReference, forReference, forScript, forScript, forUrl, forUrl, forUrl, forUrl, forUrl, getCondition, getId, internalRenderJavaScriptReference, setId
public JavaScriptReferenceHeaderItem(ResourceReference reference, PageParameters pageParameters, String id, boolean defer, String charset, String condition)
JavaScriptReferenceHeaderItem
.reference
- resource reference pointing to the javascript resourcepageParameters
- the parameters for this Javascript resource referenceid
- id that will be used to filter duplicate reference (it's still filtered by URL
too)defer
- specifies that the execution of a script should be deferred (delayed) until after
the page has been loaded.charset
- a non null value specifies the charset attribute of the script tagcondition
- the condition to use for Internet Explorer conditional comments. E.g. "IE 7".public ResourceReference getReference()
getReference
in interface IReferenceHeaderItem
public PageParameters getPageParameters()
public List<HeaderItem> getDependencies()
getDependencies
in class HeaderItem
HeaderItem
has. Dependencies will always be rendered
before the item itself.public Iterable<? extends HeaderItem> getProvidedResources()
getProvidedResources
in class HeaderItem
HeaderItem
provides. As these resources are provided by
this item, they will no longer be rendered.public void render(Response response)
HeaderItem
HeaderItem
to the response.render
in class HeaderItem
public Iterable<?> getRenderTokens()
getRenderTokens
in class HeaderItem
HeaderItem
can be identified by. If any of the tokens has
already been rendered, this HeaderItem
will not be rendered.public int hashCode()
hashCode
in class AbstractJavaScriptReferenceHeaderItem
public boolean equals(Object o)
equals
in class AbstractJavaScriptReferenceHeaderItem
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.