Java Code Examples for lombok.ast.Return#astValue()

The following examples show how to use lombok.ast.Return#astValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SharedPrefsDetector.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean visitReturn(Return node) {
    if (node.astValue() == mTarget) {
        // If you just do "return editor.commit() don't warn
        mFound = true;
    }
    return super.visitReturn(node);
}
 
Example 2
Source File: CleanupDetector.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean visitReturn(Return node) {
    Expression value = node.astValue();
    if (value instanceof VariableReference) {
        ResolvedNode resolved = mContext.resolve(value);
        //noinspection SuspiciousMethodCalls
        if (resolved != null && mVariables.contains(resolved)) {
            mEscapes = true;
        }
    }

    return super.visitReturn(node);
}
 
Example 3
Source File: ToastDetector.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean visitReturn(Return node) {
    if (node.astValue() == mTarget) {
        // If you just do "return Toast.makeText(...) don't warn
        mFound = true;
    }
    return super.visitReturn(node);
}
 
Example 4
Source File: UnsafeAndroidDetector.java    From SafelyAndroid with MIT License 5 votes vote down vote up
@Override
public boolean visitReturn(Return node) {
    if(node.astValue() == this.mTarget) {
        this.mFound = true;
    }

    return super.visitReturn(node);
}
 
Example 5
Source File: ToastDetector.java    From MeituanLintDemo with Apache License 2.0 5 votes vote down vote up
@Override
public boolean visitReturn(Return node) {
    if (node.astValue() == mTarget) {
        // If you just do "return Toast.makeText(...) don't warn
        mFound = true;
    }
    return super.visitReturn(node);
}