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