use of org.sonar.plugins.java.api.tree.ModifierKeywordTree in project sonar-java by SonarSource.
the class BadConstantNameCheck method isStaticFinal.
private static boolean isStaticFinal(VariableTree variableTree) {
boolean isStatic = false;
boolean isFinal = false;
for (ModifierKeywordTree modifierKeywordTree : variableTree.modifiers().modifiers()) {
Modifier modifier = modifierKeywordTree.modifier();
if (modifier == Modifier.STATIC) {
isStatic = true;
}
if (modifier == Modifier.FINAL) {
isFinal = true;
}
}
return isStatic && isFinal;
}
Aggregations