< prev index next >

src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/model/CClassInfo.java

Print this page


   1 /*
   2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  28 import java.util.ArrayList;
  29 import java.util.Collection;
  30 import java.util.HashSet;
  31 import java.util.Iterator;
  32 import java.util.List;
  33 import java.util.Set;
  34 
  35 import javax.xml.bind.annotation.XmlElement;
  36 import javax.xml.bind.annotation.XmlID;
  37 import javax.xml.bind.annotation.XmlIDREF;
  38 import javax.xml.bind.annotation.XmlRootElement;
  39 import javax.xml.namespace.QName;
  40 
  41 import com.sun.codemodel.internal.JClass;
  42 import com.sun.codemodel.internal.JCodeModel;
  43 import com.sun.codemodel.internal.JPackage;
  44 import com.sun.istack.internal.Nullable;
  45 import com.sun.tools.internal.xjc.Language;
  46 import com.sun.tools.internal.xjc.model.nav.NClass;
  47 import com.sun.tools.internal.xjc.model.nav.NType;
  48 import com.sun.tools.internal.xjc.outline.Aspect;
  49 import com.sun.tools.internal.xjc.outline.Outline;
  50 import com.sun.tools.internal.xjc.reader.Ring;
  51 import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
  52 import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIFactoryMethod;
  53 import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
  54 import com.sun.xml.internal.bind.v2.model.core.Element;
  55 import com.sun.xml.internal.xsom.XSComponent;
  56 
  57 import org.xml.sax.Locator;
  58 
  59 /**
  60  * Mutable {@link ClassInfo} represenatation.
  61  *
  62  * <p>
  63  * Schema parsers build these objects.
  64  *
  65  * @author Kohsuke Kawaguchi
  66  */
  67 public final class CClassInfo extends AbstractCElement implements ClassInfo<NType,NClass>, CClassInfoParent, CClass, NClass {
  68 
  69     @XmlIDREF
  70     private CClass baseClass;
  71 
  72     /**
  73      * List of all subclasses, together with {@link #nextSibling}.
  74      *
  75      * If this class has no sub-class, this field is null. Otherwise,
  76      * this field points to a sub-class of this class. From there you can enumerate
  77      * all the sub-classes by using {@link #nextSibling}.
  78      */
  79     private CClassInfo firstSubclass;
  80 


   1 /*
   2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  28 import java.util.ArrayList;
  29 import java.util.Collection;
  30 import java.util.HashSet;
  31 import java.util.Iterator;
  32 import java.util.List;
  33 import java.util.Set;
  34 
  35 import javax.xml.bind.annotation.XmlElement;
  36 import javax.xml.bind.annotation.XmlID;
  37 import javax.xml.bind.annotation.XmlIDREF;
  38 import javax.xml.bind.annotation.XmlRootElement;
  39 import javax.xml.namespace.QName;
  40 
  41 import com.sun.codemodel.internal.JClass;
  42 import com.sun.codemodel.internal.JCodeModel;
  43 import com.sun.codemodel.internal.JPackage;
  44 import com.sun.istack.internal.Nullable;
  45 import com.sun.tools.internal.xjc.Language;
  46 import com.sun.tools.internal.xjc.model.nav.NClass;
  47 import com.sun.tools.internal.xjc.model.nav.NType;

  48 import com.sun.tools.internal.xjc.outline.Outline;
  49 import com.sun.tools.internal.xjc.reader.Ring;
  50 import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
  51 import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIFactoryMethod;
  52 import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
  53 import com.sun.xml.internal.bind.v2.model.core.Element;
  54 import com.sun.xml.internal.xsom.XSComponent;
  55 
  56 import org.xml.sax.Locator;
  57 
  58 /**
  59  * Mutable {@link ClassInfo} representation.
  60  *
  61  * <p>
  62  * Schema parsers build these objects.
  63  *
  64  * @author Kohsuke Kawaguchi
  65  */
  66 public final class CClassInfo extends AbstractCElement implements ClassInfo<NType,NClass>, CClassInfoParent, CClass, NClass {
  67 
  68     @XmlIDREF
  69     private CClass baseClass;
  70 
  71     /**
  72      * List of all subclasses, together with {@link #nextSibling}.
  73      *
  74      * If this class has no sub-class, this field is null. Otherwise,
  75      * this field points to a sub-class of this class. From there you can enumerate
  76      * all the sub-classes by using {@link #nextSibling}.
  77      */
  78     private CClassInfo firstSubclass;
  79 


< prev index next >