java.lang.Object
java.lang.Record
org.aya.terck.CallGraph<T,P>
public record CallGraph<T,P> (@NotNull kala.collection.mutable.MutableMap<T,@NotNull kala.collection.mutable.MutableMap<T,kala.collection.mutable.MutableList<@NotNull CallMatrix<T,P>>>> graph)
extends Record
Call graph is a multi-graph; each vertex represents a definition and each edge from vertex `f`
to vertex `g` represents a call to `g` within `f`. The edges are labeled with call matrices,
and can be labelled with several call matrices if there are several paths from `f` to `g`.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,P> @NotNull CallGraph<T, P> create()final booleanIndicates whether some other object is "equal to" this one.find bad recursive calls in current SCCstatic <K,V> void forEachGraph(@NotNull kala.collection.mutable.MutableMap<K, kala.collection.mutable.MutableMap<K, V>> a, @NotNull kala.collection.mutable.MutableMap<K, kala.collection.mutable.MutableMap<K, V>> b, @NotNull Consumer<V> inA, @NotNull Consumer<V> inB, @NotNull BiConsumer<V, V> both) static <K,V> void forEachMap(@NotNull kala.collection.mutable.MutableMap<K, V> a, @NotNull kala.collection.mutable.MutableMap<K, V> b, @NotNull Consumer<V> inA, @NotNull Consumer<V> inB, @NotNull BiConsumer<V, V> both) @NotNull kala.collection.mutable.MutableMap<T,@NotNull kala.collection.mutable.MutableMap<T, kala.collection.mutable.MutableList<@NotNull CallMatrix<T, P>>>> graph()Returns the value of thegraphrecord component.final inthashCode()Returns a hash code value for this object.booleanisEmpty()voidput(@NotNull CallMatrix<T, P> matrix) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CallGraph
public CallGraph(@NotNull @NotNull kala.collection.mutable.MutableMap<T, @NotNull kala.collection.mutable.MutableMap<T, kala.collection.mutable.MutableList<@NotNull CallMatrix<T, P>>>> graph) Creates an instance of aCallGraphrecord class.- Parameters:
graph- the value for thegraphrecord component
-
-
Method Details
-
create
-
put
-
isEmpty
public boolean isEmpty()- Returns:
- true if there's no edge
-
forEachGraph
public static <K,V> void forEachGraph(@NotNull @NotNull kala.collection.mutable.MutableMap<K, kala.collection.mutable.MutableMap<K, V>> a, @NotNull @NotNull kala.collection.mutable.MutableMap<K, kala.collection.mutable.MutableMap<K, V>> b, @NotNull @NotNull Consumer<V> inA, @NotNull @NotNull Consumer<V> inB, @NotNull @NotNull BiConsumer<V, V> both) -
forEachMap
public static <K,V> void forEachMap(@NotNull @NotNull kala.collection.mutable.MutableMap<K, V> a, @NotNull @NotNull kala.collection.mutable.MutableMap<K, V> b, @NotNull @NotNull Consumer<V> inA, @NotNull @NotNull Consumer<V> inB, @NotNull @NotNull BiConsumer<V, V> both) -
findBadRecursion
find bad recursive calls in current SCC -
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
graph
@NotNull public @NotNull kala.collection.mutable.MutableMap<T,@NotNull kala.collection.mutable.MutableMap<T, graph()kala.collection.mutable.MutableList<@NotNull CallMatrix<T, P>>>> Returns the value of thegraphrecord component.- Returns:
- the value of the
graphrecord component
-