@Override public boolean visit(SingleVariableDeclaration node) { this.declarationModifierVisited = false; if (node.getParent() instanceof MethodDeclaration) { // special case: annotations on parameters without modifiers should not be treated as type annotations this.declarationModifierVisited = (node.getModifiers() == 0); } return true; }
@Override public boolean visit(SingleVariableDeclaration node) { this.declarationModifierVisited = false; if (node.getParent() instanceof MethodDeclaration) { // special case: annotations on parameters without modifiers should not be treated as type annotations this.declarationModifierVisited = (node.getModifiers() == 0); } return true; }
@Override public boolean visit(SingleVariableDeclaration node) { this.declarationModifierVisited = false; if (node.getParent() instanceof MethodDeclaration) { // special case: annotations on parameters without modifiers should not be treated as type annotations this.declarationModifierVisited = (node.getModifiers() == 0); } return true; }
@Override public boolean visit(SingleVariableDeclaration node) { this.declarationModifierVisited = false; if (node.getParent() instanceof MethodDeclaration) { // special case: annotations on parameters without modifiers should not be treated as type annotations this.declarationModifierVisited = (node.getModifiers() == 0); } return true; }
public boolean isFinal() { return Modifier.isFinal(fDeclaration.getModifiers()); }
public boolean isFinal() { return Modifier.isFinal(fDeclaration.getModifiers()); }
final int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value) { if (property == MODIFIERS_PROPERTY) { if (get) { return getModifiers(); } else { setModifiers(value); return 0; } } if (property == EXTRA_DIMENSIONS_PROPERTY) { if (get) { return getExtraDimensions(); } else { internalSetExtraDimensions(value); return 0; } } // allow default implementation to flag the error return super.internalGetSetIntProperty(property, get, value); }
final int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value) { if (property == MODIFIERS_PROPERTY) { if (get) { return getModifiers(); } else { setModifiers(value); return 0; } } if (property == EXTRA_DIMENSIONS_PROPERTY) { if (get) { return getExtraDimensions(); } else { internalSetExtraDimensions(value); return 0; } } // allow default implementation to flag the error return super.internalGetSetIntProperty(property, get, value); }
final int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value) { if (property == MODIFIERS_PROPERTY) { if (get) { return getModifiers(); } else { setModifiers(value); return 0; } } if (property == EXTRA_DIMENSIONS_PROPERTY) { if (get) { return getExtraDimensions(); } else { setExtraDimensions(value); return 0; } } // allow default implementation to flag the error return super.internalGetSetIntProperty(property, get, value); }
@Override final int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value) { if (property == MODIFIERS_PROPERTY) { if (get) { return getModifiers(); } else { setModifiers(value); return 0; } } if (property == EXTRA_DIMENSIONS_PROPERTY) { if (get) { return getExtraDimensions(); } else { internalSetExtraDimensions(value); return 0; } } // allow default implementation to flag the error return super.internalGetSetIntProperty(property, get, value); }
final int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value) { if (property == MODIFIERS_PROPERTY) { if (get) { return getModifiers(); } else { setModifiers(value); return 0; } } if (property == EXTRA_DIMENSIONS_PROPERTY) { if (get) { return getExtraDimensions(); } else { internalSetExtraDimensions(value); return 0; } } // allow default implementation to flag the error return super.internalGetSetIntProperty(property, get, value); }
final int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value) { if (property == MODIFIERS_PROPERTY) { if (get) { return getModifiers(); } else { setModifiers(value); return 0; } } if (property == EXTRA_DIMENSIONS_PROPERTY) { if (get) { return getExtraDimensions(); } else { internalSetExtraDimensions(value); return 0; } } // allow default implementation to flag the error return super.internalGetSetIntProperty(property, get, value); }
public boolean visit(SingleVariableDeclaration node) { if (node.getAST().apiLevel() == AST.JLS2) { printModifiers(node.getModifiers()); } if (node.getAST().apiLevel() >= AST.JLS3) { printModifiers(node.modifiers()); } node.getType().accept(this); if (node.getAST().apiLevel() >= AST.JLS3) { if (node.isVarargs()) { this.fBuffer.append("...");//$NON-NLS-1$ } } this.fBuffer.append(" ");//$NON-NLS-1$ node.getName().accept(this); for (int i= 0; i < node.getExtraDimensions(); i++) { this.fBuffer.append("[]"); //$NON-NLS-1$ } if (node.getInitializer() != null) { this.fBuffer.append("=");//$NON-NLS-1$ node.getInitializer().accept(this); } return false; }
public boolean visit(SingleVariableDeclaration node) { printIndent(); if (node.getAST().apiLevel() == JLS2) { printModifiers(node.getModifiers()); } if (node.getAST().apiLevel() >= AST.JLS3) { printModifiers(node.modifiers()); } node.getType().accept(this); if (node.getAST().apiLevel() >= AST.JLS3) { if (node.isVarargs()) { this.buffer.append("...");//$NON-NLS-1$ } } this.buffer.append(" ");//$NON-NLS-1$ node.getName().accept(this); for (int i = 0; i < node.getExtraDimensions(); i++) { this.buffer.append("[]"); //$NON-NLS-1$ } if (node.getInitializer() != null) { this.buffer.append("=");//$NON-NLS-1$ node.getInitializer().accept(this); } return false; }
ASTNode clone0(AST target) { SingleVariableDeclaration result = new SingleVariableDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.setModifiers(getModifiers()); } else { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setVarargs(isVarargs()); } result.setType((Type) getType().clone(target)); if (this.ast.apiLevel >= AST.JLS8_INTERNAL) { result.varargsAnnotations().addAll( ASTNode.copySubtrees(target, varargsAnnotations())); } result.setName((SimpleName) getName().clone(target)); if (this.ast.apiLevel >= AST.JLS8_INTERNAL) { result.extraDimensions().addAll( ASTNode.copySubtrees(target, this.extraDimensions())); } else { result.internalSetExtraDimensions(getExtraDimensions()); } result.setInitializer( (Expression) ASTNode.copySubtree(target, getInitializer())); return result; }
ASTNode clone0(AST target) { SingleVariableDeclaration result = new SingleVariableDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.setModifiers(getModifiers()); } else { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setVarargs(isVarargs()); } result.setType((Type) getType().clone(target)); if (this.ast.apiLevel >= AST.JLS8) { result.varargsAnnotations().addAll( ASTNode.copySubtrees(target, varargsAnnotations())); } result.setName((SimpleName) getName().clone(target)); if (this.ast.apiLevel >= AST.JLS8) { result.extraDimensions().addAll( ASTNode.copySubtrees(target, this.extraDimensions())); } else { result.internalSetExtraDimensions(getExtraDimensions()); } result.setInitializer( (Expression) ASTNode.copySubtree(target, getInitializer())); return result; }
@Override ASTNode clone0(AST target) { SingleVariableDeclaration result = new SingleVariableDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.setModifiers(getModifiers()); } else { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setVarargs(isVarargs()); } result.setType((Type) getType().clone(target)); if (this.ast.apiLevel >= AST.JLS8_INTERNAL) { result.varargsAnnotations().addAll( ASTNode.copySubtrees(target, varargsAnnotations())); } result.setName((SimpleName) getName().clone(target)); if (this.ast.apiLevel >= AST.JLS8_INTERNAL) { result.extraDimensions().addAll( ASTNode.copySubtrees(target, this.extraDimensions())); } else { result.internalSetExtraDimensions(getExtraDimensions()); } result.setInitializer( (Expression) ASTNode.copySubtree(target, getInitializer())); return result; }
ASTNode clone0(AST target) { SingleVariableDeclaration result = new SingleVariableDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.setModifiers(getModifiers()); } else { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setVarargs(isVarargs()); } result.setType((Type) getType().clone(target)); if (this.ast.apiLevel >= AST.JLS8) { result.varargsAnnotations().addAll( ASTNode.copySubtrees(target, varargsAnnotations())); } result.setName((SimpleName) getName().clone(target)); if (this.ast.apiLevel >= AST.JLS8) { result.extraDimensions().addAll( ASTNode.copySubtrees(target, this.extraDimensions())); } else { result.internalSetExtraDimensions(getExtraDimensions()); } result.setInitializer( (Expression) ASTNode.copySubtree(target, getInitializer())); return result; }
ASTNode clone0(AST target) { SingleVariableDeclaration result = new SingleVariableDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.setModifiers(getModifiers()); } else { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setVarargs(isVarargs()); } result.setType((Type) getType().clone(target)); if (this.ast.apiLevel >= AST.JLS8) { result.varargsAnnotations().addAll( ASTNode.copySubtrees(target, varargsAnnotations())); } result.setName((SimpleName) getName().clone(target)); if (this.ast.apiLevel >= AST.JLS8) { result.extraDimensions().addAll( ASTNode.copySubtrees(target, this.extraDimensions())); } else { result.internalSetExtraDimensions(getExtraDimensions()); } result.setInitializer( (Expression) ASTNode.copySubtree(target, getInitializer())); return result; }
ASTNode clone0(AST target) { SingleVariableDeclaration result = new SingleVariableDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); if (this.ast.apiLevel == AST.JLS2_INTERNAL) { result.setModifiers(getModifiers()); } else { result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setVarargs(isVarargs()); } result.setType((Type) getType().clone(target)); result.setExtraDimensions(getExtraDimensions()); result.setName((SimpleName) getName().clone(target)); result.setInitializer( (Expression) ASTNode.copySubtree(target, getInitializer())); return result; }