jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JPackage.java
changeset 42124 640a383428fb
parent 27837 86d4f46e622a
equal deleted inserted replaced
42002:3ee4e7827413 42124:640a383428fb
     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()) {