Record Class AccessPathStore<V extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<V>>

java.lang.Object
java.lang.Record
com.google.errorprone.dataflow.AccessPathStore<V>
All Implemented Interfaces:
AccessPathValues<V>, org.checkerframework.errorprone.dataflow.analysis.Store<AccessPathStore<V>>

public record AccessPathStore<V extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<V>>(com.google.common.collect.ImmutableMap<AccessPath, V extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<V>> heap) extends Record implements org.checkerframework.errorprone.dataflow.analysis.Store<AccessPathStore<V>>, AccessPathValues<V>
Immutable map from local variables or heap access paths to their AbstractValue

To derive a new instance, create a builder from an old instance. To start from scratch, call empty().

Author:
bennostein@google.com (Benno Stein)
  • Constructor Details

    • AccessPathStore

      public AccessPathStore(com.google.common.collect.ImmutableMap<AccessPath, V> heap)
      Creates an instance of a AccessPathStore record class.
      Parameters:
      heap - the value for the heap record component
  • Method Details

    • empty

      public static <V extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<V>> AccessPathStore<V> empty()
    • toBuilder

      public AccessPathStore.Builder<V> toBuilder()
    • valueOfAccessPath

      public V valueOfAccessPath(AccessPath path, V defaultValue)
      Specified by:
      valueOfAccessPath in interface AccessPathValues<V extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<V>>
    • copy

      public AccessPathStore<V> copy()
      Specified by:
      copy in interface org.checkerframework.errorprone.dataflow.analysis.Store<V extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<V>>
    • leastUpperBound

      public AccessPathStore<V> leastUpperBound(AccessPathStore<V> other)
      Specified by:
      leastUpperBound in interface org.checkerframework.errorprone.dataflow.analysis.Store<V extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<V>>
    • widenedUpperBound

      public AccessPathStore<V> widenedUpperBound(AccessPathStore<V> vAccessPathStore)
      Specified by:
      widenedUpperBound in interface org.checkerframework.errorprone.dataflow.analysis.Store<V extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<V>>
    • canAlias

      public boolean canAlias(org.checkerframework.errorprone.dataflow.expression.JavaExpression a, org.checkerframework.errorprone.dataflow.expression.JavaExpression b)
      Specified by:
      canAlias in interface org.checkerframework.errorprone.dataflow.analysis.Store<V extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<V>>
    • visualize

      public String visualize(org.checkerframework.errorprone.dataflow.cfg.visualize.CFGVisualizer<?, AccessPathStore<V>, ?> cfgVisualizer)
      Specified by:
      visualize in interface org.checkerframework.errorprone.dataflow.analysis.Store<V extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<V>>
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in interface org.checkerframework.errorprone.dataflow.analysis.Store<V extends org.checkerframework.errorprone.dataflow.analysis.AbstractValue<V>>
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • heap

      public com.google.common.collect.ImmutableMap<AccessPath, V> heap()
      Returns the value of the heap record component.
      Returns:
      the value of the heap record component