Class AbstractClass

java.lang.Object
sootup.core.model.AbstractClass
Direct Known Subclasses:
SootClass

public abstract class AbstractClass extends Object
Abstract class represents a class/module lives in View. It may have different implementations, since we want to support multiple languages. An abstract class must be uniquely identified by its Signature.
Author:
Linghui Luo
  • Field Details

  • Constructor Details

  • Method Details

    • getClassSource

      @Nonnull public SootClassSource getClassSource()
    • getName

      @Nonnull public abstract String getName()
    • getType

      @Nonnull public abstract Type getType()
    • getFields

      @Nonnull public abstract Set<? extends SootField> getFields()
    • getMethods

      @Nonnull public abstract Set<? extends SootMethod> getMethods()
    • getMethod

      @Nonnull public Optional<? extends SootMethod> getMethod(@Nonnull MethodSubSignature subSignature)
      Attempts to retrieve the method with the given subSignature. This method may throw an AmbiguousStateException if there are more than one method with the given subSignature. If no method with the given is found, null is returned.
    • getField

      @Nonnull public Optional<? extends SootField> getField(@Nonnull FieldSubSignature subSignature)
      Attemtps to retrieve the field with the given FieldSubSignature.
    • getField

      @Nonnull public Optional<? extends SootField> getField(@Nonnull String name)
      Returns the field of this class with the given name. Throws a ResolveException if there is more than one field with the given name. Returns null if no field with the given name exists.
    • getMethod

      @Nonnull public Optional<? extends SootMethod> getMethod(@Nonnull String name, @Nonnull Iterable<? extends Type> parameterTypes)
      Attempts to retrieve the method with the given name and parameters. This method may throw an ResolveException if there is more than one method with the given name and parameter.
    • getMethodsByName

      @Nonnull public Set<? extends SootMethod> getMethodsByName(@Nonnull String name)
      Attempts to retrieve the method with the given name. This method will return an empty Set if there is no method with the given name.
      Parameters:
      name - the name of the method
      Returns:
      a set of methods that have the given name