/**
* Checks {@link @UnlockMethod}-annotated methods.
*/
private void handleUnlockAnnotatedMethods(MethodInvocationTree tree) {
UnlockMethod annotation = ASTHelpers.getAnnotation(tree, UnlockMethod.class);
if (annotation == null) {
return;
}
for (String lockString : annotation.value()) {
Optional<GuardedByExpression> guard = GuardedByBinder.bindString(
lockString, GuardedBySymbolResolver.from(tree, state));
// TODO(user): http://docs.oracle.com/javase/8/docs/api/java/util/Optional.html#ifPresent
if (guard.isPresent()) {
Optional<GuardedByExpression> lock =