@Override final List internalGetChildListProperty(ChildListPropertyDescriptor property) { if (property == MODIFIERS2_PROPERTY) { return modifiers(); } if (property == ARGUMENTS_PROPERTY) { return arguments(); } // allow default implementation to flag the error return super.internalGetChildListProperty(property); }
final List internalGetChildListProperty(ChildListPropertyDescriptor property) { if (property == MODIFIERS2_PROPERTY) { return modifiers(); } if (property == ARGUMENTS_PROPERTY) { return arguments(); } // allow default implementation to flag the error return super.internalGetChildListProperty(property); }
final List internalGetChildListProperty(ChildListPropertyDescriptor property) { if (property == MODIFIERS2_PROPERTY) { return modifiers(); } if (property == ARGUMENTS_PROPERTY) { return arguments(); } // allow default implementation to flag the error return super.internalGetChildListProperty(property); }
final List internalGetChildListProperty(ChildListPropertyDescriptor property) { if (property == MODIFIERS2_PROPERTY) { return modifiers(); } if (property == ARGUMENTS_PROPERTY) { return arguments(); } // allow default implementation to flag the error return super.internalGetChildListProperty(property); }
final List internalGetChildListProperty(ChildListPropertyDescriptor property) { if (property == MODIFIERS2_PROPERTY) { return modifiers(); } if (property == ARGUMENTS_PROPERTY) { return arguments(); } // allow default implementation to flag the error return super.internalGetChildListProperty(property); }
final List internalGetChildListProperty(ChildListPropertyDescriptor property) { if (property == MODIFIERS2_PROPERTY) { return modifiers(); } if (property == ARGUMENTS_PROPERTY) { return arguments(); } // allow default implementation to flag the error return super.internalGetChildListProperty(property); }
public boolean visit(EnumConstantDeclaration node) { if (node.getJavadoc() != null) { node.getJavadoc().accept(this); } printModifiers(node.modifiers()); node.getName().accept(this); if (!node.arguments().isEmpty()) { this.fBuffer.append("(");//$NON-NLS-1$ for (Iterator it= node.arguments().iterator(); it.hasNext();) { Expression e= (Expression) it.next(); e.accept(this); if (it.hasNext()) { this.fBuffer.append(",");//$NON-NLS-1$ } } this.fBuffer.append(")");//$NON-NLS-1$ } if (node.getAnonymousClassDeclaration() != null) { node.getAnonymousClassDeclaration().accept(this); } return false; }
@Override public boolean visit(EnumConstantDeclaration node) { if (node.getJavadoc() != null) { node.getJavadoc().accept(this); } printIndent(); printModifiers(node.modifiers()); node.getName().accept(this); if (!node.arguments().isEmpty()) { this.buffer.append("(");//$NON-NLS-1$ for (Iterator it = node.arguments().iterator(); it.hasNext(); ) { Expression e = (Expression) it.next(); e.accept(this); if (it.hasNext()) { this.buffer.append(",");//$NON-NLS-1$ } } this.buffer.append(")");//$NON-NLS-1$ } if (node.getAnonymousClassDeclaration() != null) { node.getAnonymousClassDeclaration().accept(this); } return false; }
public boolean visit(EnumConstantDeclaration node) { if (node.getJavadoc() != null) { node.getJavadoc().accept(this); } printIndent(); printModifiers(node.modifiers()); node.getName().accept(this); if (!node.arguments().isEmpty()) { this.buffer.append("(");//$NON-NLS-1$ for (Iterator it = node.arguments().iterator(); it.hasNext(); ) { Expression e = (Expression) it.next(); e.accept(this); if (it.hasNext()) { this.buffer.append(",");//$NON-NLS-1$ } } this.buffer.append(")");//$NON-NLS-1$ } if (node.getAnonymousClassDeclaration() != null) { node.getAnonymousClassDeclaration().accept(this); } return false; }
public boolean visit(EnumConstantDeclaration node) { if (node.getJavadoc() != null) { node.getJavadoc().accept(this); } printIndent(); printModifiers(node.modifiers()); node.getName().accept(this); if (!node.arguments().isEmpty()) { this.buffer.append("(");//$NON-NLS-1$ for (Iterator it = node.arguments().iterator(); it.hasNext(); ) { Expression e = (Expression) it.next(); e.accept(this); if (it.hasNext()) { this.buffer.append(",");//$NON-NLS-1$ } } this.buffer.append(")");//$NON-NLS-1$ } if (node.getAnonymousClassDeclaration() != null) { node.getAnonymousClassDeclaration().accept(this); } return false; }
public boolean visit(EnumConstantDeclaration node) { if (node.getJavadoc() != null) { node.getJavadoc().accept(this); } printIndent(); printModifiers(node.modifiers()); node.getName().accept(this); if (!node.arguments().isEmpty()) { this.buffer.append("(");//$NON-NLS-1$ for (Iterator it = node.arguments().iterator(); it.hasNext(); ) { Expression e = (Expression) it.next(); e.accept(this); if (it.hasNext()) { this.buffer.append(",");//$NON-NLS-1$ } } this.buffer.append(")");//$NON-NLS-1$ } if (node.getAnonymousClassDeclaration() != null) { node.getAnonymousClassDeclaration().accept(this); } return false; }
public boolean visit(EnumConstantDeclaration node) { if (node.getJavadoc() != null) { node.getJavadoc().accept(this); } printIndent(); printModifiers(node.modifiers()); node.getName().accept(this); if (!node.arguments().isEmpty()) { this.buffer.append("(");//$NON-NLS-1$ for (Iterator it = node.arguments().iterator(); it.hasNext(); ) { Expression e = (Expression) it.next(); e.accept(this); if (it.hasNext()) { this.buffer.append(",");//$NON-NLS-1$ } } this.buffer.append(")");//$NON-NLS-1$ } if (node.getAnonymousClassDeclaration() != null) { node.getAnonymousClassDeclaration().accept(this); } return false; }
@SuppressWarnings("unchecked") @Override public void createdEnumLiteral(final String literal, final EnumConstantDeclaration enumConstantDeclaration) { final AST ast = enumConstantDeclaration.getAST(); final NormalAnnotation an = ast.newNormalAnnotation(); an.setTypeName(ast.newName("com.google.gson.annotations.SerializedName")); final MemberValuePair mvp = ast.newMemberValuePair(); mvp.setName(ast.newSimpleName("value")); mvp.setValue(JDTHelper.newStringLiteral(ast, literal)); an.values().add(mvp); enumConstantDeclaration.modifiers().add(an); } }
ASTNode clone0(AST target) { EnumConstantDeclaration result = new EnumConstantDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setName((SimpleName) getName().clone(target)); result.arguments().addAll(ASTNode.copySubtrees(target, arguments())); result.setAnonymousClassDeclaration( (AnonymousClassDeclaration) ASTNode.copySubtree(target, getAnonymousClassDeclaration())); return result; }
ASTNode clone0(AST target) { EnumConstantDeclaration result = new EnumConstantDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setName((SimpleName) getName().clone(target)); result.arguments().addAll(ASTNode.copySubtrees(target, arguments())); result.setAnonymousClassDeclaration( (AnonymousClassDeclaration) ASTNode.copySubtree(target, getAnonymousClassDeclaration())); return result; }
ASTNode clone0(AST target) { EnumConstantDeclaration result = new EnumConstantDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setName((SimpleName) getName().clone(target)); result.arguments().addAll(ASTNode.copySubtrees(target, arguments())); result.setAnonymousClassDeclaration( (AnonymousClassDeclaration) ASTNode.copySubtree(target, getAnonymousClassDeclaration())); return result; }
ASTNode clone0(AST target) { EnumConstantDeclaration result = new EnumConstantDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setName((SimpleName) getName().clone(target)); result.arguments().addAll(ASTNode.copySubtrees(target, arguments())); result.setAnonymousClassDeclaration( (AnonymousClassDeclaration) ASTNode.copySubtree(target, getAnonymousClassDeclaration())); return result; }
@Override ASTNode clone0(AST target) { EnumConstantDeclaration result = new EnumConstantDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setName((SimpleName) getName().clone(target)); result.arguments().addAll(ASTNode.copySubtrees(target, arguments())); result.setAnonymousClassDeclaration( (AnonymousClassDeclaration) ASTNode.copySubtree(target, getAnonymousClassDeclaration())); return result; }
ASTNode clone0(AST target) { EnumConstantDeclaration result = new EnumConstantDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc( (Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); result.setName((SimpleName) getName().clone(target)); result.arguments().addAll(ASTNode.copySubtrees(target, arguments())); result.setAnonymousClassDeclaration( (AnonymousClassDeclaration) ASTNode.copySubtree(target, getAnonymousClassDeclaration())); return result; }
public boolean visit(EnumConstantDeclaration node) { IValueList extendedModifiers = parseExtendedModifiers(node.modifiers()); IValue name = values.string(node.getName().getFullyQualifiedName()); IValueList arguments = new IValueList(values); if (!node.arguments().isEmpty()) { for (Iterator it = node.arguments().iterator(); it.hasNext();) { Expression e = (Expression) it.next(); arguments.add(visitChild(e)); } } IValue anonymousClassDeclaration = node.getAnonymousClassDeclaration() == null ? null : visitChild(node.getAnonymousClassDeclaration()); ownValue = constructDeclarationNode("enumConstant", name, arguments.asList(), anonymousClassDeclaration); setKeywordParameters("modifiers", extendedModifiers); return false; }