File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
java/ql/lib/semmle/code/java/dataflow/internal Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -280,6 +280,21 @@ module Public {
280280 explicitInstanceArgument ( call , result .asExpr ( ) ) or
281281 implicitInstanceArgument ( call , result .( ImplicitInstanceAccess ) .getInstanceAccess ( ) )
282282 }
283+
284+ /** A node representing an `InstanceAccessExt`. */
285+ class InstanceAccessNode extends Node {
286+ InstanceAccessNode ( ) {
287+ this instanceof ImplicitInstanceAccess or this .asExpr ( ) instanceof InstanceAccess
288+ }
289+
290+ /** Gets the instance access corresponding to this node. */
291+ InstanceAccessExt getInstanceAccess ( ) {
292+ result = this .( ImplicitInstanceAccess ) .getInstanceAccess ( ) or result .isExplicit ( this .asExpr ( ) )
293+ }
294+
295+ /** Holds if this is an access to an object's own instance. */
296+ predicate isOwnInstanceAccess ( ) { this .getInstanceAccess ( ) .isOwnInstanceAccess ( ) }
297+ }
283298}
284299
285300private import Public
You can’t perform that action at this time.
0 commit comments