Enum Class SourceSinkType

java.lang.Object
java.lang.Enum<SourceSinkType>
soot.jimple.infoflow.sourcesSinks.definitions.SourceSinkType
All Implemented Interfaces:
Serializable, Comparable<SourceSinkType>, Constable

public enum SourceSinkType extends Enum<SourceSinkType>
Enumeration for defining whether an element is a source, a sink, both, or neither
Author:
Steven Arzt
  • Enum Constant Details

  • Method Details

    • values

      public static SourceSinkType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SourceSinkType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromFlags

      public static SourceSinkType fromFlags(boolean isSink, boolean isSource)
      Converts boolean flags (is source, is sink) into a source/sink type
      Parameters:
      isSink - True if this method is a sink
      isSource - True if this method is a source
      Returns:
      The source/sink type of the method according to the given flags
    • isSource

      public boolean isSource()
      Gets whether this type represents a source
      Returns:
      True if this type represents a source, otherwise false
    • isSink

      public boolean isSink()
      Gets whether this type represents a sink
      Returns:
      True if this type represents a sink, otherwise false
    • removeType

      public SourceSinkType removeType(SourceSinkType toRemove)
      Removes the given source / sink type from the combined type. In other words, this method converts, e.g., "Both" to "Source", if "Sink" shall be removed.
      Parameters:
      toRemove - The element to remove
      Returns:
      The new combined type from which the given element was removed
    • addType

      public SourceSinkType addType(SourceSinkType toAdd)
      Adds the given source / sink type to the combined type. In other words, this method converts, e.g., "Source" to "Both", if "Source" shall be added.
      Parameters:
      toAdd - The element to add
      Returns:
      The new combined type to which the given element was added
    • fromString

      public static SourceSinkType fromString(String sourceSinkTypeString)