Initial commit from SVN.

This commit is contained in:
wcrisman
2014-05-30 10:31:51 -07:00
commit b45e56b890
1968 changed files with 370949 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2008,2009 Declarative Engineering LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Declarative Engineering LLC
* verson 1 which accompanies this distribution, and is available at
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
*/
package com.de22.orb;
public class DefaultProxyInterfaceLoader implements IProxyInterfaceLoader {
/**
* DefaultProxyInterfaceLoader constructor.
*/
public DefaultProxyInterfaceLoader() {
}//DefaultProxyInterfaceLoader()//
/* (non-Javadoc)
* @see com.de22.orb.IProxyInterfaceLoader#loadDefaultProxyInterface(java.lang.Object, java.lang.ClassLoader)
*/
public Class loadDefaultProxyInterface(Object proxiedObject, ClassLoader classLoader) throws ClassNotFoundException {
Class result = null;
String interfaceClassName = proxiedObject.getClass().getName();
int index = interfaceClassName.lastIndexOf('.') + 1;
interfaceClassName = interfaceClassName.substring(0, index) + 'I' + interfaceClassName.substring(index);
if(classLoader == null) {
result = Class.forName(interfaceClassName);
}//if//
else {
result = classLoader.loadClass(interfaceClassName);
}//else//
return result;
}//loadDefaultProxyInterface()//
/* (non-Javadoc)
* @see com.de22.orb.IProxyInterfaceLoader#loadProxyClass(java.lang.Class, java.lang.ClassLoader)
*/
public Class loadProxyClass(Class interfaceClass, ClassLoader classLoader) throws ClassNotFoundException {
Class result = null;
if(classLoader == null) {
result = Class.forName(interfaceClass.getName() + Proxy.PROXY_EXTENSION);
}//if//
else {
result = classLoader.loadClass(interfaceClass.getName() + Proxy.PROXY_EXTENSION);
}//else//
return result;
}//loadProxyClass()//
}//DefaultProxyInterfaceLoader//