Class JDKBridge
java.lang.Object
com.sun.corba.ee.impl.util.JDKBridge
Utility methods for doing various method calls which are used
by multiple classes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet local codebase System property (java.rmi.server.codebase).static ClassReturns a class instance for the specified class.static ClassReturns a class instance for the specified class.static ClassloadClass(String className, String remoteCodebase, ClassLoader loader) Returns a class instance for the specified class.static voidSet the codebase and useCodebaseOnly properties.static voidsetLocalCodebase(String codebase) Set the default code base.static booleanReturn true if the system property "java.rmi.server.useCodebaseOnly" is set, false otherwise.
-
Constructor Details
-
JDKBridge
public JDKBridge()
-
-
Method Details
-
getLocalCodebase
Get local codebase System property (java.rmi.server.codebase). May be null or a space separated array of URLS.- Returns:
- The value of the property
-
useCodebaseOnly
public static boolean useCodebaseOnly()Return true if the system property "java.rmi.server.useCodebaseOnly" is set, false otherwise.- Returns:
- If the property is set
-
loadClass
public static Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException Returns a class instance for the specified class.- Parameters:
className- the name of the classremoteCodebase- a space-separated array of urls at which the class might be found. May be null.loader- a ClassLoader who may be used to load the class if all other methods fail.- Returns:
- the
Classobject representing the loaded class. - Throws:
ClassNotFoundException- if class cannot be loaded.
-
loadClass
public static Class loadClass(String className, String remoteCodebase) throws ClassNotFoundException Returns a class instance for the specified class.- Parameters:
className- the name of the classremoteCodebase- a space-separated array of urls at which the class might be found. May be null.- Returns:
- the
Classobject representing the loaded class. - Throws:
ClassNotFoundException- if class cannot be loaded.
-
loadClass
Returns a class instance for the specified class.- Parameters:
className- the name of the class- Returns:
- the
Classobject representing the loaded class. - Throws:
ClassNotFoundException- if class cannot be loaded.
-
setCodebaseProperties
public static void setCodebaseProperties()Set the codebase and useCodebaseOnly properties. This is public only for test code. -
setLocalCodebase
Set the default code base. This method is here only for test code.- Parameters:
codebase- The local codebase
-