Files
codeql/java/ql/examples/snippets/unusedmethod.ql
2019-08-02 15:27:28 +02:00

18 lines
318 B
Plaintext

/**
* @id java/examples/unusedmethod
* @name Unused private method
* @description Finds private methods that are not accessed
* @tags method
* access
* private
*/
import java
from Method m
where
m.isPrivate() and
not exists(m.getAReference()) and
not m instanceof InitializerMethod
select m