Enum FlowValue

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FlowValue>

    public enum FlowValue
    extends java.lang.Enum<FlowValue>
    Flow value type for type qualifier dataflow analysis.
    Author:
    David Hovemeyer
    • Method Detail

      • values

        public static FlowValue[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FlowValue c : FlowValue.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FlowValue valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isYes

        public boolean isYes()
      • isUncertain

        public boolean isUncertain()
      • isNo

        public boolean isNo()
      • valuesConflict

        public static boolean valuesConflict​(boolean strictChecking,
                                             FlowValue forward,
                                             FlowValue backward)
        Determine whether given flow values conflict.
        Parameters:
        forward - a forwards flow value
        backward - a backwards flow value
        Returns:
        true if values conflict, false otherwise
      • flowValueFromWhen

        public static FlowValue flowValueFromWhen​(javax.annotation.meta.When when)
        Convert a When value to a FlowValue value.
        Parameters:
        when - a When value
        Returns:
        the corresponding FlowValue
      • backwardsValueConflictsWithSource

        public static boolean backwardsValueConflictsWithSource​(FlowValue backwardsFlowValue,
                                                                SourceSinkInfo source,
                                                                TypeQualifierValue typeQualifierValue,
                                                                boolean isIdentity)
        Determine whether given backwards FlowValue conflicts with given source.
        Parameters:
        backwardsFlowValue - a backwards FlowValue
        source - SourceSinkInfo object representing a source reached by the backwards flow value
        typeQualifierValue - TypeQualifierValue being checked
        isIdentity - TODO
        Returns:
        true if backwards value conflicts with source, false if not