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
PathBasedAnalysisInputLocation
s 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 Path
protected final @NonNull SourceType
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
PathBasedAnalysisInputLocation
(@NonNull Path path, @NonNull SourceType srcType) protected
PathBasedAnalysisInputLocation
(@NonNull Path path, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors) protected
PathBasedAnalysisInputLocation
(@NonNull Path path, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors, @NonNull Collection<Path> ignoredPaths) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull PathBasedAnalysisInputLocation
create
(@NonNull Path path, @NonNull SourceType sourceType) static @NonNull PathBasedAnalysisInputLocation
create
(@NonNull Path path, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors) static @NonNull PathBasedAnalysisInputLocation
create
(@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 SourceType
If 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, wait
Methods 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:AnalysisInputLocation
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.- Specified by:
getSourceType
in interfaceAnalysisInputLocation
- Returns:
- returns null as source type
-
getBodyInterceptors
- Specified by:
getBodyInterceptors
in 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)
-