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
43 import com.sun.tools.internal.xjc.model.nav.NClass;
44 import com.sun.tools.internal.xjc.model.nav.NType;
45 import com.sun.tools.internal.xjc.model.nav.NavigatorImpl;
46 import com.sun.tools.internal.xjc.outline.Aspect;
47 import com.sun.tools.internal.xjc.outline.Outline;
48 import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIInlineBinaryData;
49 import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIFactoryMethod;
50 import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
51 import com.sun.tools.internal.xjc.reader.Ring;
52 import com.sun.xml.internal.bind.v2.model.core.ElementInfo;
53 import com.sun.xml.internal.xsom.XSElementDecl;
54 import com.sun.xml.internal.xsom.XmlString;
55
56 import org.xml.sax.Locator;
57
58 /**
59 * {@link ElementInfo} implementation for the compile-time model.
60 *
61 * <p>
62 * As an NType, it represents the Java representation of this element
63 * (either JAXBElement<T> or Foo).
64 *
65 * @author Kohsuke Kawaguchi
66 */
67 public final class CElementInfo extends AbstractCElement
68 implements ElementInfo<NType,NClass>, NType, CClassInfoParent {
69
70 private final QName tagName;
71
72 /**
73 * Represents {@code JAXBElement<ContentType>}.
74 */
75 private NType type;
76
77 /**
78 * If this element produces its own class, the short name of that class.
79 * Otherwise null.
80 */
81 private String className;
82
83 /**
84 * If this element is global, the element info is considered to be
85 * package-level, and this points to the package in which this element
86 * lives in.
87 *
88 * <p>
89 * For local elements, this points to the parent {@link CClassInfo}.
90 */
91 public final CClassInfoParent parent;
92
93 private CElementInfo substitutionHead;
|
1 /*
2 * Copyright (c) 1997, 2015, 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
43 import com.sun.tools.internal.xjc.model.nav.NClass;
44 import com.sun.tools.internal.xjc.model.nav.NType;
45 import com.sun.tools.internal.xjc.model.nav.NavigatorImpl;
46 import com.sun.tools.internal.xjc.outline.Aspect;
47 import com.sun.tools.internal.xjc.outline.Outline;
48 import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIInlineBinaryData;
49 import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIFactoryMethod;
50 import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
51 import com.sun.tools.internal.xjc.reader.Ring;
52 import com.sun.xml.internal.bind.v2.model.core.ElementInfo;
53 import com.sun.xml.internal.xsom.XSElementDecl;
54 import com.sun.xml.internal.xsom.XmlString;
55
56 import org.xml.sax.Locator;
57
58 /**
59 * {@link ElementInfo} implementation for the compile-time model.
60 *
61 * <p>
62 * As an NType, it represents the Java representation of this element
63 * (either {@code JAXBElement<T>} or Foo).
64 *
65 * @author Kohsuke Kawaguchi
66 */
67 public final class CElementInfo extends AbstractCElement
68 implements ElementInfo<NType,NClass>, NType, CClassInfoParent {
69
70 private final QName tagName;
71
72 /**
73 * Represents {@code JAXBElement<ContentType>}.
74 */
75 private NType type;
76
77 /**
78 * If this element produces its own class, the short name of that class.
79 * Otherwise null.
80 */
81 private String className;
82
83 /**
84 * If this element is global, the element info is considered to be
85 * package-level, and this points to the package in which this element
86 * lives in.
87 *
88 * <p>
89 * For local elements, this points to the parent {@link CClassInfo}.
90 */
91 public final CClassInfoParent parent;
92
93 private CElementInfo substitutionHead;
|