equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
333 public Iterator<JDefinedClass> classes() { |
333 public Iterator<JDefinedClass> classes() { |
334 return classes.values().iterator(); |
334 return classes.values().iterator(); |
335 } |
335 } |
336 |
336 |
337 /** |
337 /** |
|
338 * Checks if this package contains any classes. |
|
339 * @return {@code true} if this package contains any classes |
|
340 * or {@code false} otherwise. |
|
341 */ |
|
342 public boolean hasClasses() { |
|
343 return !classes.isEmpty(); |
|
344 } |
|
345 |
|
346 /** |
338 * Checks if a given name is already defined as a class/interface |
347 * Checks if a given name is already defined as a class/interface |
339 */ |
348 */ |
340 public boolean isDefined(String classLocalName) { |
349 public boolean isDefined(String classLocalName) { |
341 Iterator<JDefinedClass> itr = classes(); |
350 Iterator<JDefinedClass> itr = classes(); |
342 while (itr.hasNext()) { |
351 while (itr.hasNext()) { |