Package sootup.jimple.frontend
Class JimpleStringAnalysisInputLocation
java.lang.Object
sootup.jimple.frontend.JimpleStringAnalysisInputLocation
- All Implemented Interfaces:
AnalysisInputLocation
This AnalysisInputLocation encapsulates and represents a single Jimple "file" - the contents of
the Class are given via String.
see JimpleStringAnalysisInputLocationTest for an example.
-
Constructor Summary
ConstructorDescriptionJimpleStringAnalysisInputLocation
(String jimpleFileContents) JimpleStringAnalysisInputLocation
(String jimpleFileContents, SourceType sourceType, 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
-
JimpleStringAnalysisInputLocation
-
JimpleStringAnalysisInputLocation
public JimpleStringAnalysisInputLocation(@Nonnull String jimpleFileContents, @Nonnull SourceType sourceType, @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
-