final DetailAST modifiersAST =
aAST.findFirstToken(TokenTypes.MODIFIERS);
final boolean isStatic = (modifiersAST != null)
&& modifiersAST.branchContains(TokenTypes.LITERAL_STATIC);
final boolean isFinal = (modifiersAST != null)
&& modifiersAST.branchContains(TokenTypes.FINAL);
if ((isStatic && isFinal)
|| ScopeUtils.inInterfaceOrAnnotationBlock(aAST))
{
// Handle the serialVersionUID and serialPersistentFields constants