File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
java/ql/src/semmle/code/java Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -599,6 +599,13 @@ class Class extends RefType, @class {
599599 /** Holds if this class is a local class. */
600600 predicate isLocal ( ) { isLocalClass ( this , _) }
601601
602+ /** Holds if this class is package protected, that is, neither public nor private nor protected. */
603+ predicate isPackageProtected ( ) {
604+ not isPrivate ( ) and
605+ not isProtected ( ) and
606+ not isPublic ( )
607+ }
608+
602609 override RefType getSourceDeclaration ( ) { classes ( this , _, _, result ) }
603610
604611 /**
@@ -816,6 +823,13 @@ class Interface extends RefType, @interface {
816823 any ( )
817824 }
818825
826+ /** Holds if this interface is package protected, that is, neither public nor private nor protected. */
827+ predicate isPackageProtected ( ) {
828+ not isPrivate ( ) and
829+ not isProtected ( ) and
830+ not isPublic ( )
831+ }
832+
819833 override string getAPrimaryQlClass ( ) { result = "Interface" }
820834}
821835
You can’t perform that action at this time.
0 commit comments