< prev index next >
src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 31,41 ****
class FactoryFinder {
/**
* Creates an instance of the specified class using the specified
! * <code>ClassLoader</code> object.
*
* @exception SOAPException if the given class could not be found
* or could not be instantiated
*/
private static Object newInstance(String className,
--- 31,41 ----
class FactoryFinder {
/**
* Creates an instance of the specified class using the specified
! * {@code ClassLoader} object.
*
* @exception SOAPException if the given class could not be found
* or could not be instantiated
*/
private static Object newInstance(String className,
*** 52,68 ****
throw new SOAPException("Provider " + className + " could not be instantiated: " + x, x);
}
}
/**
! * Finds the implementation <code>Class</code> object for the given
* factory name, or null if that fails.
* <P>
* This method is package private so that this code can be shared.
*
! * @return the <code>Class</code> object of the specified message factory;
! * or <code>null</code>
*
* @param factoryId the name of the factory to find, which is
* a system property
* @exception SOAPException if there is a SOAP error
*/
--- 52,68 ----
throw new SOAPException("Provider " + className + " could not be instantiated: " + x, x);
}
}
/**
! * Finds the implementation {@code Class} object for the given
* factory name, or null if that fails.
* <P>
* This method is package private so that this code can be shared.
*
! * @return the {@code Class} object of the specified message factory;
! * or {@code null}
*
* @param factoryId the name of the factory to find, which is
* a system property
* @exception SOAPException if there is a SOAP error
*/
*** 71,124 ****
{
return find(factoryId, null, false);
}
/**
! * Finds the implementation <code>Class</code> object for the given
! * factory name, or if that fails, finds the <code>Class</code> object
* for the given fallback class name. The arguments supplied must be
* used in order. If using the first argument is successful, the second
* one will not be used.
* <P>
* This method is package private so that this code can be shared.
*
! * @return the <code>Class</code> object of the specified message factory;
! * may be <code>null</code>
*
* @param factoryId the name of the factory to find, which is
* a system property
* @param fallbackClassName the implementation class name, which is
* to be used only if nothing else
! * is found; <code>null</code> to indicate that
* there is no fallback class name
* @exception SOAPException if there is a SOAP error
*/
static Object find(String factoryId, String fallbackClassName)
throws SOAPException
{
return find(factoryId, fallbackClassName, true);
}
/**
! * Finds the implementation <code>Class</code> object for the given
! * factory name, or if that fails, finds the <code>Class</code> object
! * for the given default class name, but only if <code>tryFallback</code>
! * is <code>true</code>. The arguments supplied must be used in order
* If using the first argument is successful, the second one will not
* be used. Note the default class name may be needed even if fallback
* is not to be attempted, so certain error conditions can be handled.
* <P>
* This method is package private so that this code can be shared.
*
! * @return the <code>Class</code> object of the specified message factory;
! * may not be <code>null</code>
*
* @param factoryId the name of the factory to find, which is
* a system property
* @param defaultClassName the implementation class name, which is
* to be used only if nothing else
! * is found; <code>null</code> to indicate
* that there is no default class name
* @param tryFallback whether to try the default class as a
* fallback
* @exception SOAPException if there is a SOAP error
*/
--- 71,124 ----
{
return find(factoryId, null, false);
}
/**
! * Finds the implementation {@code Class} object for the given
! * factory name, or if that fails, finds the {@code Class} object
* for the given fallback class name. The arguments supplied must be
* used in order. If using the first argument is successful, the second
* one will not be used.
* <P>
* This method is package private so that this code can be shared.
*
! * @return the {@code Class} object of the specified message factory;
! * may be {@code null}
*
* @param factoryId the name of the factory to find, which is
* a system property
* @param fallbackClassName the implementation class name, which is
* to be used only if nothing else
! * is found; {@code null} to indicate that
* there is no fallback class name
* @exception SOAPException if there is a SOAP error
*/
static Object find(String factoryId, String fallbackClassName)
throws SOAPException
{
return find(factoryId, fallbackClassName, true);
}
/**
! * Finds the implementation {@code Class} object for the given
! * factory name, or if that fails, finds the {@code Class} object
! * for the given default class name, but only if {@code tryFallback}
! * is {@code true}. The arguments supplied must be used in order
* If using the first argument is successful, the second one will not
* be used. Note the default class name may be needed even if fallback
* is not to be attempted, so certain error conditions can be handled.
* <P>
* This method is package private so that this code can be shared.
*
! * @return the {@code Class} object of the specified message factory;
! * may not be {@code null}
*
* @param factoryId the name of the factory to find, which is
* a system property
* @param defaultClassName the implementation class name, which is
* to be used only if nothing else
! * is found; {@code null} to indicate
* that there is no default class name
* @param tryFallback whether to try the default class as a
* fallback
* @exception SOAPException if there is a SOAP error
*/
< prev index next >