Package sootup.core.frontend
Class SootClassSource
java.lang.Object
sootup.core.frontend.AbstractClassSource
sootup.core.frontend.SootClassSource
- Direct Known Subclasses:
JavaSootClassSource
,OverridingClassSource
Basic class for retrieving information that is needed to build a
SootClass
.- Author:
- Manuel Benz created on 22.05.18, Ben Hermann, Linghui Luo
-
Field Summary
Fields inherited from class sootup.core.frontend.AbstractClassSource
classSignature, classSource, sourcePath
-
Constructor Summary
ModifierConstructorDescriptionprotected
SootClassSource
(SootClassSource delegate) SootClassSource
(AnalysisInputLocation srcNamespace, ClassType classSignature, Path sourcePath) Creates and aSootClassSource
for a specific source file. -
Method Summary
Modifier and TypeMethodDescriptionabstract Collection<? extends SootField>
Reads from the source to retrieve its fields.Reads from the source to retrieve its directly implemented interfaces.abstract Collection<? extends SootMethod>
Reads from the source to retrieve its methods.abstract Set<ClassModifier>
Reads from the source to retrieve its modifiers.Reads from the source to retrieve its outer class, if this is an inner class.abstract Position
Reads from the source to retrieve its position in the source code.Reads from the source to retrieve its superclass, if present.Methods inherited from class sootup.core.frontend.AbstractClassSource
buildClass, equals, getAnalysisInputLocation, getClassType, getSourcePath, hashCode
-
Constructor Details
-
SootClassSource
public SootClassSource(@Nonnull AnalysisInputLocation srcNamespace, @Nonnull ClassType classSignature, @Nonnull Path sourcePath) Creates and aSootClassSource
for a specific source file. The file should be passed asPath
and can be located in an arbitraryFileSystem
. Implementations should useFiles.newInputStream(Path, OpenOption...)
to access the file.- Parameters:
srcNamespace
- TheAnalysisInputLocation
that holds the given filesourcePath
- Path to the source file of the to-be-createdSootClassSource
. The given path has to exist and requires to be handled by thisClassProvider
. Implementations might double check this if wanted.classSignature
- the signature that has been used to resolve this class
-
SootClassSource
-
-
Method Details
-
resolveMethods
Reads from the source to retrieve its methods. This may be an expensive operation.- Throws:
ResolveException
-
resolveFields
Reads from the source to retrieve its fields. This may be an expensive operation.- Throws:
ResolveException
-
resolveModifiers
Reads from the source to retrieve its modifiers. This may be an expensive operation. -
resolveInterfaces
Reads from the source to retrieve its directly implemented interfaces. This may be an expensive operation. -
resolveSuperclass
Reads from the source to retrieve its superclass, if present. This may be an expensive operation. -
resolveOuterClass
Reads from the source to retrieve its outer class, if this is an inner class. This may be an expensive operation.- Returns:
-
resolvePosition
Reads from the source to retrieve its position in the source code. This may be an expensive operation.
-