01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package sun.awt;
19:
20: /**
21: * Stub class, added to make applications like Netbeans which address
22: * this class by name compilable on Harmony.
23: */
24: public class AppContext {
25:
26: /**
27: * Instance to be returned by {@link #getAppContext()}.
28: */
29: private static final AppContext instance = new AppContext(null);
30:
31: /**
32: * Stub method, returns the instance of this class;
33: */
34: public static final AppContext getAppContext() {
35: return instance;
36: }
37:
38: /**
39: * Constructor, stub, does nothing.
40: * Doesn't throw {@link UnsupportedOperationException}
41: * for tests to be able to access the class instance methods.
42: */
43: AppContext(ThreadGroup group) {
44: }
45:
46: /**
47: * Stub method, throws {@link UnsupportedOperationException}.
48: */
49: public Object get(Object key) {
50: throw new UnsupportedOperationException(
51: "sun.awt.AppContext class is a stub and is not implemented");
52: }
53:
54: /**
55: * Stub method, throws {@link UnsupportedOperationException}.
56: */
57: public Object put(Object key, Object value) {
58: throw new UnsupportedOperationException(
59: "sun.awt.AppContext class is a stub and is not implemented");
60: }
61:
62: /**
63: * Stub method, throws {@link UnsupportedOperationException}.
64: */
65: public Object remove(Object key) {
66: throw new UnsupportedOperationException(
67: "sun.awt.AppContext class is a stub and is not implemented");
68: }
69: }
|