java.lang.Object
com.zeroc.Ice.ModuleToPackageSliceLoader
- All Implemented Interfaces:
SliceLoader
Implements SliceLoader using a map of Slice-module names to Java-package names.
-
Constructor Summary
ConstructorsConstructorDescriptionModuleToPackageSliceLoader(String module, String packageName) Creates a ModuleToPackageSliceLoader using a single 'module to package' mapping.ModuleToPackageSliceLoader(Map<String, String> moduleToPackageMap, ClassLoader classLoader) Creates a ModuleToPackageSliceLoader. -
Method Summary
Modifier and TypeMethodDescriptionnewInstance(String typeId) Creates an instance of a class mapped from a Slice class or exception based on a Slice type ID.
-
Constructor Details
-
ModuleToPackageSliceLoader
Creates a ModuleToPackageSliceLoader.- Parameters:
moduleToPackageMap- a map of Slice module names to Java package namesclassLoader- the class loader to use to load the classes. Can be null.
-
ModuleToPackageSliceLoader
Creates a ModuleToPackageSliceLoader using a single 'module to package' mapping.- Parameters:
module- the Slice type ID of the Slice module, for example "::VisitorCenter"packageName- the name of the Java package, for example "com.example.visitorcenter"
-
-
Method Details
-
newInstance
Description copied from interface:SliceLoaderCreates an instance of a class mapped from a Slice class or exception based on a Slice type ID.- Specified by:
newInstancein interfaceSliceLoader- Parameters:
typeId- the Slice type ID or compact type ID- Returns:
- a new instance of the class or exception identified by
typeId, ornullif the implementation cannot find the corresponding class
-