java.lang.Object
com.zeroc.Ice.ClassSliceLoader
- All Implemented Interfaces:
SliceLoader
Implements SliceLoader using an array of annotated classes.
-
Constructor Summary
Constructors -
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
-
ClassSliceLoader
Creates a ClassSliceLoader.- Parameters:
classes
- An array of classes with theSliceTypeId
annotation. Each class may also have theCompactSliceTypeId
annotation.- Throws:
IllegalArgumentException
- If any class is not annotated withSliceTypeId
.
-
-
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.
-