1.1 --- a/src/share/classes/com/sun/tools/javac/code/Scope.java Thu Jul 04 10:35:33 2013 +0100 1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Scope.java Thu Jul 04 10:41:08 2013 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -316,6 +316,7 @@ 1.11 public Entry lookup(Name name) { 1.12 return lookup(name, noFilter); 1.13 } 1.14 + 1.15 public Entry lookup(Name name, Filter<Symbol> sf) { 1.16 Entry e = table[getIndex(name)]; 1.17 if (e == null || e == sentinel) 1.18 @@ -361,6 +362,10 @@ 1.19 } 1.20 } 1.21 1.22 + public boolean anyMatch(Filter<Symbol> sf) { 1.23 + return getElements(sf).iterator().hasNext(); 1.24 + } 1.25 + 1.26 public Iterable<Symbol> getElements() { 1.27 return getElements(noFilter); 1.28 }