Interface AnalysisInputLocation

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
ModuleInfoAnalysisInputLocation
All Known Implementing Classes:
ApkAnalysisInputLocation, ArchiveBasedAnalysisInputLocation, ClassFileBasedAnalysisInputLocation, DefaultRuntimeAnalysisInputLocation, DownloadJarAnalysisInputLocation, EagerInputLocation, JavaClassPathAnalysisInputLocation, JavaModulePathAnalysisInputLocation, JimpleAnalysisInputLocation, JimpleStringAnalysisInputLocation, JrtFileSystemAnalysisInputLocation, ModuleMultiReleaseJarAnalysisInputLocation, MultiReleaseJarAnalysisInputLocation, OTFCompileAnalysisInputLocation, PathBasedAnalysisInputLocation

public interface AnalysisInputLocation extends AutoCloseable
Public interface to an input location. AnalysisInputLocations are sources for SootClasses, e.g. Java Classpath, Android APK, JAR file, etc. The strategy to traverse something.

getClassSource(ClassType, View) and getClassSources(View) should in most cases simply call getClassSource(ClassType, View) or getClassSources(View) respectively with the default BodyInterceptors of the frontend.

Author:
Manuel Benz created on 22.05.18, Ben Hermann, Linghui Luo
  • Method Details

    • getClassSource

      @NonNull Optional<? extends SootClassSource> getClassSource(@NonNull ClassType type, @NonNull View view)
      Create or find a class source for a given type.
      Parameters:
      type - The type of the class to be found.
      Returns:
      The source entry for that class.
    • getClassSources

      @NonNull Stream<? extends SootClassSource> getClassSources(@NonNull View view)
      Scan the input location and create ClassSources for every compilation / interpretation unit.
      Returns:
      an Autocloseable resource that must be closed!
    • getSourceType

      @NonNull SourceType getSourceType()
      If the AnalysisInputLocation is initialized with the SourceType then this method should return that specific SourceType. This is the default implementation and it returns null when no source type is specified.
      Returns:
      returns null as source type
    • getBodyInterceptors

      @NonNull List<BodyInterceptor> getBodyInterceptors()
    • close

      default void close() throws Exception
      Release any file-system resources held by this input location (e.g. open ZipFileSystems).
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception