Class JSSourceExtractor
java.lang.Object
com.ibm.wala.cast.js.html.JSSourceExtractor
- Direct Known Subclasses:
DomLessSourceExtractor
Extracts scripts from a given URL of an HTML. Retrieves also attached js files. Provides file and
line mapping for each extracted SourceFileModule back to the original file and line number.
- Author:
- yinnonh, danielk
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractSources(URL entrypointUrl, IHtmlParser htmlParser, IUrlResolver urlResolver) abstract Set<MappedSourceModule> extractSources(URL entrypointUrl, IHtmlParser htmlParser, IUrlResolver urlResolver, Reader reader) abstract FileReturns the temporary file created by a call toextractSources(URL, IHtmlParser, IUrlResolver, Reader)which holds all the discovered JS source.
-
Field Details
-
DELETE_UPON_EXIT
public static boolean DELETE_UPON_EXIT -
USE_TEMP_NAME
public static boolean USE_TEMP_NAME
-
-
Constructor Details
-
JSSourceExtractor
public JSSourceExtractor()
-
-
Method Details
-
getTempFile
Returns the temporary file created by a call toextractSources(URL, IHtmlParser, IUrlResolver, Reader)which holds all the discovered JS source. If no such file exists, returnsnull -
extractSources
public Set<MappedSourceModule> extractSources(URL entrypointUrl, IHtmlParser htmlParser, IUrlResolver urlResolver) throws IOException, TranslatorToCAst.Error - Throws:
IOExceptionTranslatorToCAst.Error
-
extractSources
public abstract Set<MappedSourceModule> extractSources(URL entrypointUrl, IHtmlParser htmlParser, IUrlResolver urlResolver, Reader reader) throws IOException, TranslatorToCAst.Error - Throws:
IOExceptionTranslatorToCAst.Error
-