@Override public boolean matches(final INode other, final Match match) { if (other instanceof FieldDeclaration) { final FieldDeclaration otherDeclaration = (FieldDeclaration) other; return !otherDeclaration.isNull() && matchString(getName(), otherDeclaration.getName()) && matchAnnotationsAndModifiers(otherDeclaration, match) && getReturnType().matches(otherDeclaration.getReturnType(), match); } return false; } }
@Override public boolean matches(final INode other, final Match match) { if (other instanceof FieldDeclaration) { final FieldDeclaration otherDeclaration = (FieldDeclaration) other; return !otherDeclaration.isNull() && matchString(getName(), otherDeclaration.getName()) && matchAnnotationsAndModifiers(otherDeclaration, match) && getReturnType().matches(otherDeclaration.getReturnType(), match); } return false; } }
@Override public boolean matches(final INode other, final Match match) { if (other instanceof FieldDeclaration) { final FieldDeclaration otherDeclaration = (FieldDeclaration) other; return !otherDeclaration.isNull() && matchString(getName(), otherDeclaration.getName()) && matchAnnotationsAndModifiers(otherDeclaration, match) && getReturnType().matches(otherDeclaration.getReturnType(), match); } return false; } }
@Override public Void visitFieldDeclaration(final FieldDeclaration node, final Void data) { final TypeReference leftType = getType(node.getReturnType()); if (leftType != null) { for (final VariableInitializer initializer : node.getVariables()) { processPossibleTypeCast(initializer.getInitializer(), leftType); } } return super.visitFieldDeclaration(node, data); }
@Override public Void visitFieldDeclaration(final FieldDeclaration node, final Void data) { final TypeReference leftType = getType(node.getReturnType()); if (leftType != null) { for (final VariableInitializer initializer : node.getVariables()) { processPossibleTypeCast(initializer.getInitializer(), leftType); } } return super.visitFieldDeclaration(node, data); }
@Override public Void visitFieldDeclaration(final FieldDeclaration node, final Void data) { final TypeReference leftType = getType(node.getReturnType()); if (leftType != null) { for (final VariableInitializer initializer : node.getVariables()) { processPossibleTypeCast(initializer.getInitializer(), leftType); } } return super.visitFieldDeclaration(node, data); }
@Override public boolean matches(final INode other, final Match match) { if (other instanceof FieldDeclaration) { final FieldDeclaration otherDeclaration = (FieldDeclaration) other; return !otherDeclaration.isNull() && matchString(getName(), otherDeclaration.getName()) && matchAnnotationsAndModifiers(otherDeclaration, match) && getReturnType().matches(otherDeclaration.getReturnType(), match) && getMembers().matches(getMembers(), match); } return false; } }
@Override public boolean matches(final INode other, final Match match) { if (other instanceof FieldDeclaration) { final FieldDeclaration otherDeclaration = (FieldDeclaration) other; return !otherDeclaration.isNull() && matchString(getName(), otherDeclaration.getName()) && matchAnnotationsAndModifiers(otherDeclaration, match) && getReturnType().matches(otherDeclaration.getReturnType(), match) && getMembers().matches(getMembers(), match); } return false; } }
@Override public boolean matches(final INode other, final Match match) { if (other instanceof FieldDeclaration) { final FieldDeclaration otherDeclaration = (FieldDeclaration) other; return !otherDeclaration.isNull() && matchString(getName(), otherDeclaration.getName()) && matchAnnotationsAndModifiers(otherDeclaration, match) && getReturnType().matches(otherDeclaration.getReturnType(), match) && getMembers().matches(getMembers(), match); } return false; } }
@Override public Void visitFieldDeclaration(final FieldDeclaration node, final Void ignored) { startNode(node); writeAnnotations(node.getAnnotations(), true); writeModifiers(node.getModifiers()); final FieldDefinition field = node.getUserData(Keys.FIELD_DEFINITION); if (field != null && field.isSynthetic()) { space(lastWritten != LastWritten.Whitespace); formatter.writeComment(CommentType.MultiLine, " synthetic "); space(); } node.getReturnType().acceptVisitor(this, ignored); space(); writeCommaSeparatedList(node.getVariables()); semicolon(); endNode(node); return null; }
@Override public Void visitFieldDeclaration(final FieldDeclaration node, final Void ignored) { startNode(node); writeAnnotations(node.getAnnotations(), true); writeModifiers(node.getModifiers()); final FieldDefinition field = node.getUserData(Keys.FIELD_DEFINITION); if (field != null && field.isSynthetic()) { space(lastWritten != LastWritten.Whitespace); formatter.writeComment(CommentType.MultiLine, " synthetic "); space(); } node.getReturnType().acceptVisitor(this, ignored); space(); writeCommaSeparatedList(node.getVariables()); semicolon(); endNode(node); return null; }
@Override public Void visitFieldDeclaration(final FieldDeclaration node, final Void ignored) { startNode(node); writeAnnotations(node.getAnnotations(), true); writeModifiers(node.getModifiers()); final FieldDefinition field = node.getUserData(Keys.FIELD_DEFINITION); if (field != null && field.isSynthetic()) { space(lastWritten != LastWritten.Whitespace); formatter.writeComment(CommentType.MultiLine, " synthetic "); space(); } node.getReturnType().acceptVisitor(this, ignored); space(); writeCommaSeparatedList(node.getVariables()); semicolon(); endNode(node); return null; }