Class DataFlowSpec
java.lang.Object
org.openrewrite.analysis.dataflow.DataFlowSpec
- Direct Known Subclasses:
TaintFlowSpec
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncallbackFlowModels(DataFlowNode callNode) The higher-order ("lambda call") flow models that apply at the given call node.booleanisAdditionalFlowStep(DataFlowNode srcNode, DataFlowNode sinkNode) takes an existing flow-step in the graph and offers a potential next flow step.booleanisBarrier(DataFlowNode node) Holds if flow through `expression` is prohibited.booleanisBarrierGuard(Guard guard, boolean branch) final booleanisFlowStep(DataFlowNode srcNode, DataFlowNode sinkNode) abstract booleanisSink(DataFlowNode sinkNode) The following is always true:sink == cursor.getValue().abstract booleanisSource(DataFlowNode srcNode) The following is always true:source == cursor.getValue().
-
Constructor Details
-
DataFlowSpec
public DataFlowSpec()
-
-
Method Details
-
isSource
The following is always true:source == cursor.getValue().- Parameters:
srcNode- TheDataFlowNodeto check to determine if it should be considered flow-graph source.- Returns:
trueifsrcNodeshould be considered the source or root of a flow graph.
-
isSink
The following is always true:sink == cursor.getValue().- Parameters:
sinkNode- TheDataFlowNodeto check to determine if it should be considered a flow-graph sink.- Returns:
trueifsinkNodeshould be considered the sink or leaf of a flow graph.
-
isFlowStep
-
isAdditionalFlowStep
takes an existing flow-step in the graph and offers a potential next flow step. The method can then decide if the offered potential next flow step should be considered a valid next flow step in the graph. Allows for ad-hoc taint tracking by allowing for additional, non-default flow steps to be added to the flow graph. The following is always true:srcExpression == srcCursor.getValue() && sinkExpression == sinkCursor.getValue(). -
isBarrierGuard
-
callbackFlowModels
The higher-order ("lambda call") flow models that apply at the given call node. Used by the flow engine to route data into a lambda argument's parameter or out of its return value. Callers must still confirm a given model'smatches the call.invalid reference
CallbackFlowModel#getMatcher() -
isBarrier
Holds if flow through `expression` is prohibited.
-