Class NodeUtils
java.lang.Object
org.checkerframework.dataflow.util.NodeUtils
A utility class to operate on a given 
Node.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanisArrayLengthFieldAccess(Node node) Returns true iffnodeis aFieldAccessNodethat is an access to an array's length.static booleanisBooleanTypeNode(Node node) Returns true iffnodecorresponds to a boolean typed expression (either the primitive typeboolean, or class typeBoolean).static booleanisConstantBoolean(Node n, boolean value) Returns true if the given node statically evaluates tovalueand has no side effects.static booleanisMethodInvocation(Node node, ExecutableElement method, ProcessingEnvironment env) Returns true iffnodeis an invocation of the given method.static NoderemoveCasts(Node node) Remove anyTypeCastNodes wrapping a node, returning the operand nested within the type casts.
- 
Constructor Details- 
NodeUtilspublic NodeUtils()
 
- 
- 
Method Details- 
isBooleanTypeNodeReturns true iffnodecorresponds to a boolean typed expression (either the primitive typeboolean, or class typeBoolean).- Returns:
- true iff nodecorresponds to a boolean typed expression (either the primitive typeboolean, or class typeBoolean)
 
- 
isArrayLengthFieldAccessReturns true iffnodeis aFieldAccessNodethat is an access to an array's length.- Returns:
- true iff nodeis aFieldAccessNodethat is an access to an array's length
 
- 
isMethodInvocationpublic static boolean isMethodInvocation(Node node, ExecutableElement method, ProcessingEnvironment env) Returns true iffnodeis an invocation of the given method.
- 
isConstantBooleanReturns true if the given node statically evaluates tovalueand has no side effects.- Parameters:
- n- a node
- value- the boolean value that the node is tested against
- Returns:
- true if the node is equivalent to a literal with value value
 
- 
removeCastsRemove anyTypeCastNodes wrapping a node, returning the operand nested within the type casts.- Parameters:
- node- a node
- Returns:
- node, but with any surrounding typecasts removed
 
 
-