if (checkSuperclass(implClass, typeClass)) {
return new Object[] { implClass.newInstance(), pp.provider };
} else {
if (mech) {
throw new NoSuchMechanismException
("class configured for " + type + ": " + className +
" not a " + type);
} else {
throw new NoSuchAlgorithmException
("class configured for " + type + ": " + className +
" not a " + type);
}
}
} catch (ClassNotFoundException e) {
if (mech) {
throw new NoSuchMechanismException
("class configured for " + type + "(provider: " +
providerName + ")" + "cannot be found.\n", e);
} else {
throw (NoSuchAlgorithmException) new NoSuchAlgorithmException
("class configured for " + type + "(provider: " +
providerName + ")" + "cannot be found.\n").initCause(e);
}
} catch (InstantiationException e) {
if (mech) {
throw new NoSuchMechanismException
("class " + className + " configured for " + type +
"(provider: " + providerName + ") cannot be " +
"instantiated. ", e);
} else {
throw (NoSuchAlgorithmException) new NoSuchAlgorithmException
("class " + className + " configured for " + type +
"(provider: " + providerName + ") cannot be " +
"instantiated. ").initCause(e);
}
} catch (IllegalAccessException e) {
if (mech) {
throw new NoSuchMechanismException
("class " + className + " configured for " + type +
"(provider: " + providerName +
") cannot be accessed.\n", e);
} else {
throw (NoSuchAlgorithmException) new NoSuchAlgorithmException