java.lang.Object
com.zeroc.Ice.DefaultPackageSliceLoader
- All Implemented Interfaces:
SliceLoader
Implements SliceLoader using a default package.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPackageSliceLoader
(String defaultPackage, ClassLoader classLoader) Creates a DefaultPackageSliceLoader. -
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
-
DefaultPackageSliceLoader
Creates a DefaultPackageSliceLoader.- Parameters:
defaultPackage
- The package that holds all Slice classes and exceptions. Can be empty.classLoader
- The class loader to use to load the classes. Can be null.
-
-
Method Details
-
newInstance
Description copied from interface:SliceLoader
Creates an instance of a class mapped from a Slice class or exception based on a Slice type ID.- Specified by:
newInstance
in interfaceSliceLoader
- Parameters:
typeId
- The Slice type ID or compact type ID.- Returns:
- A new instance of the class or exception identified by
typeId
, ornull
if the implementation cannot find the corresponding class.
-