Class OTFCompileAnalysisInputLocation
java.lang.Object
sootup.java.bytecode.frontend.inputlocation.OTFCompileAnalysisInputLocation
- All Implemented Interfaces:
AnalysisInputLocation
e.g. to simplify creating testcases - no manual compilation step is required
-
Constructor Summary
ConstructorDescriptionOTFCompileAnalysisInputLocation
(String fileName, String compilationUnitsContent) for Java file contents as a String i.e.OTFCompileAnalysisInputLocation
(String fileName, String compilationUnitsContent, SourceType srcType, List<BodyInterceptor> bodyInterceptors) OTFCompileAnalysisInputLocation
(Path dotJavaFile) existing .java filesOTFCompileAnalysisInputLocation
(List<Path> dotJavaFile) OTFCompileAnalysisInputLocation
(List<Path> dotJavaFiles, SourceType srcType, List<BodyInterceptor> bodyInterceptors) -
Method Summary
Modifier and TypeMethodDescriptionOptional<? extends SootClassSource>
getClassSource
(ClassType type, View view) Create or find a class source for a given type.Collection<? extends SootClassSource>
getClassSources
(View view) Scan the input location and create ClassSources for every compilation / interpretation unit.If the AnalysisInputLocation is initialized with the SourceType then this method should return that specific SourceType.
-
Constructor Details
-
OTFCompileAnalysisInputLocation
for Java file contents as a String i.e. not as a File on the filesystem -
OTFCompileAnalysisInputLocation
public OTFCompileAnalysisInputLocation(String fileName, String compilationUnitsContent, @Nonnull SourceType srcType, @Nonnull List<BodyInterceptor> bodyInterceptors) -
OTFCompileAnalysisInputLocation
existing .java files -
OTFCompileAnalysisInputLocation
-
OTFCompileAnalysisInputLocation
public OTFCompileAnalysisInputLocation(@Nonnull List<Path> dotJavaFiles, @Nonnull SourceType srcType, @Nonnull List<BodyInterceptor> bodyInterceptors)
-
-
Method Details
-
getClassSource
@Nonnull public Optional<? extends SootClassSource> getClassSource(@Nonnull ClassType type, @Nonnull View view) Description copied from interface:AnalysisInputLocation
Create or find a class source for a given type.- Specified by:
getClassSource
in interfaceAnalysisInputLocation
- Parameters:
type
- The type of the class to be found.- Returns:
- The source entry for that class.
-
getClassSources
Description copied from interface:AnalysisInputLocation
Scan the input location and create ClassSources for every compilation / interpretation unit.- Specified by:
getClassSources
in interfaceAnalysisInputLocation
- Returns:
- The source entries.
-
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
-