Java Code Examples for com.puppycrawl.tools.checkstyle.api.TokenTypes#LITERAL_PROTECTED

The following examples show how to use com.puppycrawl.tools.checkstyle.api.TokenTypes#LITERAL_PROTECTED . 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: VariableDef.java    From cacheonix-core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public int getVisibility() {
    int result = DEFAULT_VISIBILITY;

    SymTabAST visibilityNode = getVisibilityNode();
    if (visibilityNode != null) {
        if (visibilityNode.getType() == TokenTypes.LITERAL_PRIVATE) {
            result = PRIVATE_VISIBILITY;
        }
        else if (
            visibilityNode.getType() == TokenTypes.LITERAL_PROTECTED) {
            result = PROTECTED_VISIBILITY;
        }
        else if (visibilityNode.getType() == TokenTypes.LITERAL_PUBLIC) {
            result = PUBLIC_VISIBILITY;
        }
    }

    return result;
}
 
Example 2
Source File: VariableDef.java    From contribution with GNU Lesser General Public License v2.1 6 votes vote down vote up
public int getVisibility() {
    int result = DEFAULT_VISIBILITY;

    SymTabAST visibilityNode = getVisibilityNode();
    if (visibilityNode != null) {
        if (visibilityNode.getType() == TokenTypes.LITERAL_PRIVATE) {
            result = PRIVATE_VISIBILITY;
        }
        else if (
            visibilityNode.getType() == TokenTypes.LITERAL_PROTECTED) {
            result = PROTECTED_VISIBILITY;
        }
        else if (visibilityNode.getType() == TokenTypes.LITERAL_PUBLIC) {
            result = PUBLIC_VISIBILITY;
        }
    }

    return result;
}
 
Example 3
Source File: VariableDef.java    From cacheonix-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
private boolean isVisibilityNode(SymTabAST node) {
    return (
        node.getType() == TokenTypes.LITERAL_PUBLIC
            || node.getType() == TokenTypes.LITERAL_PROTECTED
            || node.getType() == TokenTypes.LITERAL_PRIVATE);
}
 
Example 4
Source File: VariableDef.java    From contribution with GNU Lesser General Public License v2.1 4 votes vote down vote up
private boolean isVisibilityNode(SymTabAST node) {
    return (
        node.getType() == TokenTypes.LITERAL_PUBLIC
            || node.getType() == TokenTypes.LITERAL_PROTECTED
            || node.getType() == TokenTypes.LITERAL_PRIVATE);
}