Package com.zeroc.Ice

Class DefaultPackageSliceLoader

java.lang.Object
com.zeroc.Ice.DefaultPackageSliceLoader
All Implemented Interfaces:
SliceLoader

public final class DefaultPackageSliceLoader extends Object implements SliceLoader
Implements SliceLoader using a default package.
  • Constructor Details

    • DefaultPackageSliceLoader

      public DefaultPackageSliceLoader(String defaultPackage, ClassLoader classLoader)
      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

      public Object newInstance(String typeId)
      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 interface SliceLoader
      Parameters:
      typeId - The Slice type ID or compact type ID.
      Returns:
      A new instance of the class or exception identified by typeId, or null if the implementation cannot find the corresponding class.