Package com.helger.html.resource.js
Class ConstantJSPathProvider
- java.lang.Object
-
- com.helger.html.resource.js.ConstantJSPathProvider
-
- All Implemented Interfaces:
IHTMLResourceProvider,IJSPathProvider,IJSProvider,Serializable
public final class ConstantJSPathProvider extends Object implements IJSPathProvider
An implementation ofIJSPathProviderusing constant paths.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.helger.html.resource.IHTMLResourceProvider
DEFAULT_IS_BUNDLABLE
-
Fields inherited from interface com.helger.html.resource.js.IJSProvider
DEFAULT_CONDITIONAL_COMMENT
-
-
Constructor Summary
Constructors Constructor Description ConstantJSPathProvider(String sPath, String sMinifiedPath, String sConditionalComment, boolean bIsBundlable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConstantJSPathProvidercreate(String sPath)static ConstantJSPathProvidercreateBundlable(String sPath, boolean bBundlable)static ConstantJSPathProvidercreateExternal(String sURI)static ConstantJSPathProvidercreateExternal(String sURI, String sConditionalComment)static ConstantJSPathProvidercreateWithConditionalComment(String sPath, String sConditionalComment)booleanequals(Object o)StringgetConditionalComment()StringgetJSItemPath(boolean bRegular)Get the path to this JavaScript resource.StringgetJSItemPathMinified()StringgetJSItemPathRegular()inthashCode()booleanisBundlable()StringtoString()
-
-
-
Method Detail
-
getJSItemPath
@Nonnull @Nonempty public String getJSItemPath(boolean bRegular)
Description copied from interface:IJSPathProviderGet the path to this JavaScript resource. It is always classpath relative.- Specified by:
getJSItemPathin interfaceIJSPathProvider- Parameters:
bRegular- iftruethe regular version of item should be retrieved, otherwise the minified version of the file.- Returns:
- The path to the external JS item.
-
getConditionalComment
@Nullable public String getConditionalComment()
- Specified by:
getConditionalCommentin interfaceIJSProvider- Returns:
- The conditional comment required for this JS item or
nullif it applies to all browsers.
-
isBundlable
public boolean isBundlable()
- Specified by:
isBundlablein interfaceIHTMLResourceProvider- Specified by:
isBundlablein interfaceIJSProvider- Returns:
- Whether or not this script can be bundled to a big JS profile. For some files this is not possible.
-
create
@Nonnull public static ConstantJSPathProvider create(@Nonnull @Nonempty String sPath)
-
createWithConditionalComment
@Nonnull public static ConstantJSPathProvider createWithConditionalComment(@Nonnull @Nonempty String sPath, @Nullable String sConditionalComment)
-
createBundlable
@Nonnull public static ConstantJSPathProvider createBundlable(@Nonnull @Nonempty String sPath, boolean bBundlable)
-
createExternal
@Nonnull public static ConstantJSPathProvider createExternal(@Nonnull @Nonempty String sURI)
-
-