use of net.sourceforge.pmd.lang.java.ast.Dimensionable in project pmd by pmd.
the class VariableNameDeclaration method isArray.
public boolean isArray() {
ASTVariableDeclaratorId astVariableDeclaratorId = (ASTVariableDeclaratorId) node;
ASTType typeNode = astVariableDeclaratorId.getTypeNode();
if (typeNode != null) {
return ((Dimensionable) typeNode.jjtGetParent()).isArray();
} else {
return false;
}
}
use of net.sourceforge.pmd.lang.java.ast.Dimensionable in project pmd by pmd.
the class VariableNameDeclaration method getArrayDepth.
public int getArrayDepth() {
ASTVariableDeclaratorId astVariableDeclaratorId = (ASTVariableDeclaratorId) node;
ASTType typeNode = astVariableDeclaratorId.getTypeNode();
if (typeNode != null) {
return ((Dimensionable) typeNode.jjtGetParent()).getArrayDepth();
} else {
return 0;
}
}
Aggregations