public static Class<?> loadStubClass(String repID, String remoteCodebase, Class<?> expectedType) throws ClassNotFoundException { // Get the repID and check for "" special case. We should never be called with it (See CDRInputStream and the // loadStub() method)... if (repID.length() == 0) { throw new ClassNotFoundException(); } // Get the stubname from the repID and load the class. If we have a valid 'sender', fall back to using its // codebase if we need to... String className = Utility.stubNameFromRepID(repID); ClassLoader expectedTypeClassLoader = (expectedType == null ? null : expectedType.getClassLoader()); try { return loadClassOfType(className, remoteCodebase, expectedTypeClassLoader, expectedType, expectedTypeClassLoader); } catch (ClassNotFoundException e) { return loadClassOfType(PackagePrefixChecker.packagePrefix() + className, remoteCodebase, expectedTypeClassLoader, expectedType, expectedTypeClassLoader); } }
public static Class<?> loadStubClass(String repID, String remoteCodebase, Class<?> expectedType) throws ClassNotFoundException { // Get the repID and check for "" special case. We should never be called with it (See CDRInputStream and the // loadStub() method)... if (repID.length() == 0) { throw new ClassNotFoundException(); } // Get the stubname from the repID and load the class. If we have a valid 'sender', fall back to using its // codebase if we need to... String className = Utility.stubNameFromRepID(repID); ClassLoader expectedTypeClassLoader = (expectedType == null ? null : expectedType.getClassLoader()); try { return loadClassOfType(className, remoteCodebase, expectedTypeClassLoader, expectedType, expectedTypeClassLoader); } catch (ClassNotFoundException e) { return loadClassOfType(PackagePrefixChecker.packagePrefix() + className, remoteCodebase, expectedTypeClassLoader, expectedType, expectedTypeClassLoader); } }
public final Class<?> getClassFromType(Class<?> expectedType, String codebase) throws ClassNotFoundException { if (clazz != null) return clazz; Class<?> specialCase = kSpecialCasesClasses.get(getClassName()); if (specialCase != null) { clazz = specialCase; return specialCase; } else { ClassLoader expectedTypeClassLoader = (expectedType == null ? null : expectedType.getClassLoader()); return Utility.loadClassOfType(getClassName(), codebase, expectedTypeClassLoader, expectedType, expectedTypeClassLoader); } }
public final Class<?> getClassFromType(Class<?> expectedType, String codebase) throws ClassNotFoundException { if (clazz != null) return clazz; Class<?> specialCase = kSpecialCasesClasses.get(getClassName()); if (specialCase != null) { clazz = specialCase; return specialCase; } else { ClassLoader expectedTypeClassLoader = (expectedType == null ? null : expectedType.getClassLoader()); return Utility.loadClassOfType(getClassName(), codebase, expectedTypeClassLoader, expectedType, expectedTypeClassLoader); } }