1/*
2 * Copyright (c) 2015, 2016, 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
23 * questions.
24 */
25
26package pkg3;
27
28import java.io.Serializable;
29
30public class A {
31   /**
32     * <p>
33     * Factory that creates new <code>javax.xml.datatype</code>
34     * <code>Object</code>s that map XML to/from Java <code>Object</code>s.</p>
35     *
36     * <p>
37     * A new instance of the <code>DatatypeFactory</code> is created through the
38     * {@link #newInstance()} method that uses the following implementation
39     * resolution mechanisms to determine an implementation:</p>
40     * <ol>
41     * <li>
42     * If the system property specified by {@link #DATATYPEFACTORY_PROPERTY},
43     * "<code>javax.xml.datatype.DatatypeFactory</code>", exists, a class with
44     * the name of the property value is instantiated. Any Exception thrown
45     * during the instantiation process is wrapped as a
46     * {@link IllegalStateException}.
47     * </li>
48     * <li>
49     * If the file ${JAVA_HOME}/lib/jaxp.properties exists, it is loaded in a
50     * {@link java.util.Properties} <code>Object</code>. The
51     * <code>Properties</code> <code>Object </code> is then queried for the
52     * property as documented in the prior step and processed as documented in
53     * the prior step.
54     * </li>
55     * <li>
56     * Uses the service-provider loading facilities, defined by the
57     * {@link java.util.ServiceLoader} class, to attempt to locate and load an
58     * implementation of the service using the {@linkplain
59     *     java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
60     * the service-provider loading facility will use the {@linkplain
61     *     java.lang.Thread#getContextClassLoader() current thread's context class loader}
62     * to attempt to load the service. If the context class loader is null, the {@linkplain
63     *     ClassLoader#getSystemClassLoader() system class loader} will be used.
64     * <br>
65     * In case of {@link java.util.ServiceConfigurationError service configuration error} a
66     * {@link javax.xml.datatype.DatatypeConfigurationException} will be thrown.
67     * </li>
68     * <li>
69     * The final mechanism is to attempt to instantiate the <code>Class</code>
70     * specified by {@link #DATATYPEFACTORY_IMPLEMENTATION_CLASS}. Any Exception
71     * thrown during the instantiation process is wrapped as a
72     * {@link IllegalStateException}.
73     * </li>
74     * </ol>
75     */
76    public static class DatatypeFactory {
77        /**
78         * some def.
79         */
80        public static String DATATYPEFACTORY_IMPLEMENTATION_CLASS = "NOTHING";
81
82        /**
83         * some def.
84         */
85        public static String DATATYPEFACTORY_PROPERTY = "NOTHING";
86
87        /**
88         * <p>Obtain a new instance of a <code>DatatypeFactory</code>.</p>
89         *
90         * <p>The implementation resolution mechanisms are <a href="#DatatypeFactory.newInstance">defined</a> in this
91         * <code>Class</code>'s documentation.</p>
92         *
93         * @return New instance of a <code>DatatypeFactory</code>
94         *
95         * @throws Exception If the implementation is not
96         *   available or cannot be instantiated.
97         *
98         * @see #newInstance(String factoryClassName, ClassLoader classLoader)
99         */
100        public static DatatypeFactory newInstance() throws Exception {
101            return null;
102        }
103
104        /**
105         * <p>Obtain a new instance of a <code>DatatypeFactory</code>.</p>
106         *
107         * <p>The implementation resolution mechanisms are <a href="#DatatypeFactory.newInstance">defined</a> in this
108         * <code>Class</code>'s documentation.</p>
109         *
110         * @param factoryClassName fe
111         * @param classLoader fi
112         * @return fo
113         * @throws Exception If the implementation is not
114         *   available or cannot be instantiated.
115         */
116        public static DatatypeFactory newInstance(String factoryClassName, ClassLoader classLoader) throws Exception {
117            return null;
118        }
119    }
120
121    /**
122     * An activation descriptor contains the information necessary to activate
123     * an object: <ul>
124     * <li> the object's group identifier,
125     * <li> the object's fully-qualified class name,
126     * <li> the object's code location (the location of the class), a codebase
127     * URL path,
128     * <li> the object's restart "mode", and,
129     * <li> a "marshalled" object that can contain object specific
130     * initialization data. </ul>
131     *
132     * <p>
133     * A descriptor registered with the activation system can be used to
134     * recreate/activate the object specified by the descriptor. The
135     * <code>MarshalledObject</code> in the object's descriptor is passed as the
136     * second argument to the remote object's constructor for object to use
137     * during reinitialization/activation.
138     */
139    public class ActivationDesc implements Serializable {}
140
141    /**
142     * The identifier for a registered activation group serves several purposes:
143     * <ul>
144     * <li>identifies the group uniquely within the activation system, and
145     * <li>contains a reference to the group's activation system so that the
146     * group can contact its activation system when necessary.</ul><p>
147     *
148     * The <code>ActivationGroupID</code> is returned from the call to
149     * <code>ActivationSystem.registerGroup</code> and is used to identify the
150     * group within the activation system. This group id is passed as one of the
151     * arguments to the activation group's special constructor when an
152     * activation group is created/recreated.
153     */
154    public class ActivationGroupID implements java.io.Serializable {}
155
156}
157