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 {
599
599
/** Holds if this class is a local class. */
600
600
predicate isLocal ( ) { isLocalClass ( this , _) }
601
601
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
+
602
609
override RefType getSourceDeclaration ( ) { classes ( this , _, _, result ) }
603
610
604
611
/**
@@ -816,6 +823,13 @@ class Interface extends RefType, @interface {
816
823
any ( )
817
824
}
818
825
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
+
819
833
override string getAPrimaryQlClass ( ) { result = "Interface" }
820
834
}
821
835
You can’t perform that action at this time.
0 commit comments