Class PathBasedAnalysisInputLocation
java.lang.Object
sootup.java.bytecode.frontend.inputlocation.PathBasedAnalysisInputLocation
- All Implemented Interfaces:
AnalysisInputLocation
- Direct Known Subclasses:
ArchiveBasedAnalysisInputLocation,ClassFileBasedAnalysisInputLocation
public abstract class PathBasedAnalysisInputLocation
extends Object
implements AnalysisInputLocation
Base class for
PathBasedAnalysisInputLocations that can be located by a Path
object.- Author:
- Manuel Benz created on 22.05.18, Kaustubh Kelkar updated on 30.07.2020
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final @NonNull List<BodyInterceptor>protected @NonNull Collection<Path>protected @NonNull Pathprotected final @NonNull SourceType -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPathBasedAnalysisInputLocation(@NonNull Path path, @NonNull SourceType srcType) protectedPathBasedAnalysisInputLocation(@NonNull Path path, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors) protectedPathBasedAnalysisInputLocation(@NonNull Path path, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors, @NonNull Collection<Path> ignoredPaths) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull PathBasedAnalysisInputLocationcreate(@NonNull Path path, @NonNull SourceType sourceType) static @NonNull PathBasedAnalysisInputLocationcreate(@NonNull Path path, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors) static @NonNull PathBasedAnalysisInputLocationcreate(@NonNull Path path, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors, @NonNull Collection<Path> ignoredPaths) protected @NonNull String@NonNull List<BodyInterceptor>protected @NonNull Optional<JavaSootClassSource>getClassSourceInternal(@NonNull JavaClassType signature, @NonNull Path path, @NonNull ClassProvider classProvider) protected Optional<JavaSootClassSource>getSingleClass(@NonNull JavaClassType signature, @NonNull Path path, @NonNull ClassProvider classProvider) @NonNull SourceTypeIf the AnalysisInputLocation is initialized with the SourceType then this method should return that specific SourceType.protected @NonNull Stream<JavaSootClassSource>walkDirectory(@NonNull Path dirPath, @NonNull IdentifierFactory factory, @NonNull ClassProvider classProvider) returns a Autocloseable resource that must be closed!Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sootup.core.inputlocation.AnalysisInputLocation
getClassSource, getClassSources
-
Field Details
-
path
-
ignoredPaths
-
sourceType
-
bodyInterceptors
-
-
Constructor Details
-
PathBasedAnalysisInputLocation
-
PathBasedAnalysisInputLocation
protected PathBasedAnalysisInputLocation(@NonNull Path path, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors) -
PathBasedAnalysisInputLocation
protected PathBasedAnalysisInputLocation(@NonNull Path path, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors, @NonNull Collection<Path> ignoredPaths)
-
-
Method Details
-
getSourceType
Description copied from interface:AnalysisInputLocationIf 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.- Specified by:
getSourceTypein interfaceAnalysisInputLocation- Returns:
- returns null as source type
-
getBodyInterceptors
- Specified by:
getBodyInterceptorsin interfaceAnalysisInputLocation
-
create
public static @NonNull PathBasedAnalysisInputLocation create(@NonNull Path path, @NonNull SourceType sourceType) -
create
public static @NonNull PathBasedAnalysisInputLocation create(@NonNull Path path, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors) -
create
public static @NonNull PathBasedAnalysisInputLocation create(@NonNull Path path, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors, @NonNull Collection<Path> ignoredPaths) -
walkDirectory
protected @NonNull Stream<JavaSootClassSource> walkDirectory(@NonNull Path dirPath, @NonNull IdentifierFactory factory, @NonNull ClassProvider classProvider) returns a Autocloseable resource that must be closed! -
fromPath
-
getClassSourceInternal
protected @NonNull Optional<JavaSootClassSource> getClassSourceInternal(@NonNull JavaClassType signature, @NonNull Path path, @NonNull ClassProvider classProvider) -
getSingleClass
protected Optional<JavaSootClassSource> getSingleClass(@NonNull JavaClassType signature, @NonNull Path path, @NonNull ClassProvider classProvider)
-