| JavaDoq: URIError_.java |
01
02 /*
03 * Descripter 1.0 - Java Script Engines
04 * Copyright (C) 2010-2015 Jianjun Liu (J.J.Liu)
05 *
06 * This program is free software: you can redistribute it and/or modify
07 * it under the terms of the GNU Affero General Public License as published by
08 * the Free Software Foundation, either version 3 of the License, or
09 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 package org.descripter.js.api.global;
21
22 import org.descripter.js.api.Core;
23 import org.descripter.js.api.Function;
24 import org.descripter.js.api.Functor;
25
26 /**
27 * <p>Emulates the global URIError function in JavaScript.</p>
28 *
29 * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.descripter.org" target="_blank">http://www.descripter.org</a>
30 * @since Descripter 1.0
31 */
32 public class URIError_ extends Function<Core>
33 {
34 /**
35 * <p>Creates the singleton of the global {@link Function} object of this type.</p>
36 * @param core The {@link Core} global script context
37 * @since Descripter 1.0
38 */
39 public static final void create(Core core) {
40 if (core.get(core._URIError) == null) {
41 core.put(core._URIError, new URIError_(core));
42 }
43 }
44
45 private URIError_(Core core) {
46 super(core);
47 }
48
49 /**
50 * <p>Gets the {@link Functor} of the {@link Function} object.</p>
51 * <p>This is a concrete implementation of the super abstract method.</p>
52 * @return The {@link Functor} of the {@link Function} object
53 * @since Descripter 1.0
54 */
55 @Override
56 protected Functor<Core> functor() {
57 return new Functor<Core>(this) {
58 @Override
59 public Object function() {
60 return null;
61 }
62 };
63 }
64 }
| JavaDoq: URIError_.java |