drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/internal/authentication/AuthorizationAuthority.java
private AuthorizationAuthority getAuthorizationAuthority(String scheme) {
        try {
            scheme = Character.toUpperCase(scheme.charAt(0)) + scheme.substring(1).toLowerCase();
            String packageName = "org.eclipse.webdav.internal.authentication"; //$NON-NLS-1$
            String className = scheme + "Authority"; //$NON-NLS-1$
            Class clazz = Class.forName(packageName + "." + className); //$NON-NLS-1$
            Constructor constructor = clazz.getConstructor(new Class[] {IAuthenticator.class});
            return (AuthorizationAuthority) constructor.newInstance(new Object[] {authenticatorStore});
        } catch (ClassCastException e) {
            // ignore or log?
        } catch (Exception e) {
            // ignore or log?
        }
        return null;
    }
private AuthorizationAuthority getAuthorizationAuthority(String scheme) {
        try {
            scheme = Character.toUpperCase(scheme.charAt(0)) + scheme.substring(1).toLowerCase();
            String packageName = "org.eclipse.webdav.internal.authentication"; //$NON-NLS-1$
            String className = scheme + "Authority"; //$NON-NLS-1$
            Class clazz = Class.forName(packageName + "." + className); //$NON-NLS-1$
            Constructor constructor = clazz.getConstructor(new Class[] {IAuthenticator.class});
            return (AuthorizationAuthority) constructor.newInstance(new Object[] {authenticatorStore});
        } catch (ClassCastException e) {
            // ignore or log?
        } catch (Exception e) {
            // ignore or log?
        }
        return null;
    }
private AuthorizationAuthority getAuthorizationAuthority ( String scheme ) { try { scheme = Character . toUpperCase ( scheme . charAt ( 0 ) ) + scheme . substring ( 1 ) . toLowerCase ( ) ; String packageName = "org.eclipse.webdav.internal.authentication" ; //$NON-NLS-1$ String className = scheme + "Authority" ; //$NON-NLS-1$ Class clazz = Class . forName ( packageName + "." + className ) ; //$NON-NLS-1$ Constructor constructor = clazz . getConstructor ( new Class [ ] { IAuthenticator . class } ) ; return ( AuthorizationAuthority ) constructor . newInstance ( new Object [ ] { authenticatorStore } ) ; } catch ( ClassCastException e ) { // ignore or log? } catch ( Exception e ) { // ignore or log? } return null ; }
Returns an authorization authority for the given authentication
scheme, or <code>null</code> if there is no such authority.

@param scheme an authentication scheme, for example: "Basic"
@return an authorization authority for the given authentication scheme
Returns an authorization authority for the given authentication scheme or <code > null< / code > if there is no such authority .