Class JSSourceExtractor

  • Direct Known Subclasses:
    DomLessSourceExtractor

    public abstract class JSSourceExtractor
    extends java.lang.Object
    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.
    • Field Detail

      • DELETE_UPON_EXIT

        public static boolean DELETE_UPON_EXIT
      • USE_TEMP_NAME

        public static boolean USE_TEMP_NAME
    • Constructor Detail

      • JSSourceExtractor

        public JSSourceExtractor()
    • Method Detail

      • extractSources

        public java.util.Set<MappedSourceModule> extractSources​(java.net.URL entrypointUrl,
                                                                IHtmlParser htmlParser,
                                                                IUrlResolver urlResolver)
                                                         throws java.io.IOException,
                                                                com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error
        Throws:
        java.io.IOException
        com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error
      • extractSources

        public abstract java.util.Set<MappedSourceModule> extractSources​(java.net.URL entrypointUrl,
                                                                         IHtmlParser htmlParser,
                                                                         IUrlResolver urlResolver,
                                                                         java.io.Reader reader)
                                                                  throws java.io.IOException,
                                                                         com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error
        Throws:
        java.io.IOException
        com.ibm.wala.cast.ir.translator.TranslatorToCAst.Error