private int getArrayDimensionOnDeclaratorId() { return getDecl().getArrayDepth(); }
@Override @Deprecated public int getArrayDepth() { if (!isArray()) { return 0; } return getTypeNode().getArrayDepth() + getVariableDeclaratorId().getArrayDepth() + (isVarargs() ? 1 : 0); }
private int checkDecl() { if (jjtGetNumChildren() < 2 || !(jjtGetChild(1) instanceof ASTVariableDeclarator)) { return 0; } return ((ASTVariableDeclaratorId) jjtGetChild(1).jjtGetChild(0)).getArrayDepth(); }
@Override public Object visit(ASTVariableDeclaratorId node, Object data) { if (node == null || node.isTypeInferred()) { return super.visit(node, data); } // Type common to all declarations in the same statement JavaTypeDefinition baseType = node.getTypeNode().getTypeDefinition(); if (baseType != null) { // add the dimensions specific to the declarator id node.setTypeDefinition(baseType.withDimensions(node.getArrayDepth())); } return super.visit(node, data); }
private int getArrayDimensionOnDeclaratorId() { return getDecl().getArrayDepth(); }
@Override @Deprecated public int getArrayDepth() { if (!isArray()) { return 0; } return getTypeNode().getArrayDepth() + getVariableDeclaratorId().getArrayDepth() + (isVarargs() ? 1 : 0); }
private int checkDecl() { if (jjtGetNumChildren() < 2 || !(jjtGetChild(1) instanceof ASTVariableDeclarator)) { return 0; } return ((ASTVariableDeclaratorId) jjtGetChild(1).jjtGetChild(0)).getArrayDepth(); }
@Override public Object visit(ASTVariableDeclaratorId node, Object data) { if (node == null || node.isTypeInferred()) { return super.visit(node, data); } // Type common to all declarations in the same statement JavaTypeDefinition baseType = node.getTypeNode().getTypeDefinition(); if (baseType != null) { // add the dimensions specific to the declarator id node.setTypeDefinition(baseType.withDimensions(node.getArrayDepth())); } return super.visit(node, data); }