Class JavaSootClassSource

java.lang.Object
sootup.java.core.JavaSootClassSource
All Implemented Interfaces:
SootClassSource, HasGenericSignature
Direct Known Subclasses:
AsmAnnotationClassSource, DexClassSource, InMemoryJavaClassSource, OverridingJavaClassSource

public abstract class JavaSootClassSource extends Object implements SootClassSource, HasGenericSignature
  • Field Details

    • analysisInputLocation

      protected final AnalysisInputLocation analysisInputLocation
    • classSignature

      protected ClassType classSignature
    • sourcePath

      protected final Path sourcePath
  • Constructor Details

  • Method Details

    • getClassFileMetadata

      public @NonNull JavaClassFileMetadata getClassFileMetadata()
      Returns immutable source and nesting attributes, empty for sources that do not provide them.
    • getGenericSignature

      public @NonNull Optional<String> getGenericSignature()
      Returns the unparsed classfile Signature attribute, or an empty optional if absent.
      Specified by:
      getGenericSignature in interface HasGenericSignature
      Returns:
      the raw classfile generic signature, or empty if absent
    • resolveAnnotations

      protected abstract Iterable<AnnotationUsage> resolveAnnotations()
    • buildClass

      public @NonNull JavaSootClass buildClass(@NonNull SourceType sourceType)
      Specified by:
      buildClass in interface SootClassSource
      Parameters:
      sourceType - instantiates the Subclass of SootClassSource to create a *SootClass
      Returns:
      a *SootClass
    • getClassType

      public ClassType getClassType()
      Specified by:
      getClassType in interface SootClassSource
    • getAnalysisInputLocation

      public AnalysisInputLocation getAnalysisInputLocation()
      Specified by:
      getAnalysisInputLocation in interface SootClassSource
    • getSourcePath

      public Path getSourcePath()
      Specified by:
      getSourcePath in interface SootClassSource
    • equals

      public boolean equals(@Nullable Object o)
      Even if a the signature changes, the classource remains the same, e.g., if it is associated to an automatic module s
      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare with
      Returns:
      both objects are logically equal
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object