1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpeclipse.phpeditor;
13 import java.util.Iterator;
15 import org.eclipse.jface.text.source.IAnnotationModel;
19 * Filters problems based on their types.
21 public class JavaAnnotationIterator implements Iterator {
23 private Iterator fIterator;
24 private IJavaAnnotation fNext;
25 private boolean fSkipIrrelevants;
27 public JavaAnnotationIterator(IAnnotationModel model, boolean skipIrrelevants) {
28 fIterator= model.getAnnotationIterator();
29 fSkipIrrelevants= skipIrrelevants;
34 while (fIterator.hasNext()) {
35 Object next= fIterator.next();
36 if (next instanceof IJavaAnnotation) {
37 IJavaAnnotation a= (IJavaAnnotation) next;
38 if (fSkipIrrelevants) {
53 * @see Iterator#hasNext()
55 public boolean hasNext() {
60 * @see Iterator#next()
62 public Object next() {
71 * @see Iterator#remove()
73 public void remove() {
74 throw new UnsupportedOperationException();