Files
codeql/java/ql/lib/semmle/code/java/frameworks/Properties.qll
Andrew Eisenberg 8e750f18ad Packaging: Java refactoring
Split java pack into `codeql/java-all` and `codeql/java-queries`.
2021-08-19 14:09:35 -07:00

28 lines
744 B
Plaintext

/* Definitions related to `java.util.Properties`. */
import semmle.code.java.Type
library class TypeProperty extends Class {
TypeProperty() { hasQualifiedName("java.util", "Properties") }
}
library class PropertiesGetPropertyMethod extends Method {
PropertiesGetPropertyMethod() {
getDeclaringType() instanceof TypeProperty and
hasName("getProperty")
}
}
library class PropertiesSetPropertyMethod extends Method {
PropertiesSetPropertyMethod() {
getDeclaringType() instanceof TypeProperty and
hasName("setProperty")
}
}
library class PropertiesStoreMethod extends Method {
PropertiesStoreMethod() {
getDeclaringType() instanceof TypeProperty and
(getName().matches("store%") or getName() = "save")
}
}