X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=libjava%2Fjavax%2Fnaming%2Fldap%2FControlFactory.java;fp=libjava%2Fjavax%2Fnaming%2Fldap%2FControlFactory.java;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=8c988ab16dd7fa65ed12a12cce39a6a78763ad87;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/libjava/javax/naming/ldap/ControlFactory.java b/libjava/javax/naming/ldap/ControlFactory.java deleted file mode 100644 index 8c988ab1..00000000 --- a/libjava/javax/naming/ldap/ControlFactory.java +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 2001 Free Software Foundation - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -package javax.naming.ldap; - -import javax.naming.*; -import java.util.StringTokenizer; -import java.util.Hashtable; - -/** - * @author Tom Tromey - * @date June 22, 2001 - */ -public abstract class ControlFactory -{ - protected ControlFactory () - { - } - - public abstract Control getControlInstance (Control control) - throws NamingException; - - public static Control getControlInstance (Control control, - Context ctx, - Hashtable env) - throws NamingException - { - String path = (String) env.get (LdapContext.CONTROL_FACTORIES); - String path2 = null; - if (ctx != null) - path2 = (String) ctx.getEnvironment ().get (LdapContext.CONTROL_FACTORIES); - if (path == null) - path = path2; - else if (path2 != null) - path += ":" + path2; - - StringTokenizer tokens = new StringTokenizer (path, ":"); - while (tokens.hasMoreTokens ()) - { - String name = tokens.nextToken (); - try - { - Class k = Class.forName (name); - ControlFactory cf = (ControlFactory) k.newInstance (); - Control ctrl = cf.getControlInstance (control); - if (ctrl != null) - return ctrl; - } - catch (ClassNotFoundException _1) - { - // Ignore it. - } - catch (ClassCastException _2) - { - // Ignore it. - } - catch (InstantiationException _3) - { - // If we couldn't instantiate the factory we might get - // this. - } - catch (IllegalAccessException _4) - { - // Another possibility when instantiating. - } - } - - return control; - } -}