KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > lib > terminalemulator > InterpKit


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is Terminal Emulator.
16  * The Initial Developer of the Original Software is Sun Microsystems, Inc..
17  * Portions created by Sun Microsystems, Inc. are Copyright (C) 2001.
18  * All Rights Reserved.
19  *
20  * Contributor(s): Ivan Soleimanipour.
21  */

22
23 /*
24  * "InterpKit.java"
25  * InterpKit.java 1.3 01/07/23
26  * The abstract operations the terminal can perform.
27  */

28
29 package org.netbeans.lib.terminalemulator;
30
31
32 /*
33  * Registry and locator for various built-in Interp's
34  */

35
36 abstract class InterpKit {
37     static Interp forName(String JavaDoc name, Ops ops) {
38     if (name.equals("dumb")) // NOI18N
39
return new InterpDumb(ops);
40     else if (name.equals("ansi")) // NOI18N
41
return new InterpANSI(ops);
42         else if (name.equals("dtterm")) // NOI18N
43
return new InterpDtTerm(ops);
44     else
45         return null;
46     }
47 }
48
Popular Tags