ilog.rules.bom.serializer

Class IlrAbstractSerializer

  • java.lang.Object
    • ilog.rules.bom.serializer.IlrAbstractSerializer
  • All Implemented Interfaces:
    IlrSerializer
    Direct Known Subclasses:
    IlrJavaSerializer, IlrXMLSerializer


    public abstract class IlrAbstractSerializer
    extends java.lang.Object
    implements IlrSerializer
    This abstract serializer provides an implementation of the methods that are used to read and write object models. However, the implementation of the read and write operations are left to the implementation of this class.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.ClassLoader getClassLoader()
      Returns the class loader set by a call to setClassLoader.
      boolean isCompactMode()
      Returns true if compact mode is enabled when writing an object model.
      boolean isJavaClassLookupEnabled()
      Returns true if Java class lookup is enabled when reading an object model definition.
      void setClassLoader(java.lang.ClassLoader classLoader)
      Sets the class loader used by the serializer to define native classes.
      void setCompactMode(boolean compactMode)
      Sets compact mode to compactMode.
      void setJavaClassLookupEnabled(boolean classLookupEnabled)
      Enables or disables Java class lookup.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IlrAbstractSerializer

        public IlrAbstractSerializer()
    • Method Detail

      • getClassLoader

        public java.lang.ClassLoader getClassLoader()
        Returns the class loader set by a call to setClassLoader.
        Specified by:
        getClassLoader in interface IlrSerializer
      • setClassLoader

        public void setClassLoader(java.lang.ClassLoader classLoader)
        Sets the class loader used by the serializer to define native classes. If the class loader is null then the Class.forName method is used to load classes.

        Initially this property is null.

        Specified by:
        setClassLoader in interface IlrSerializer
      • isJavaClassLookupEnabled

        public boolean isJavaClassLookupEnabled()
        Returns true if Java class lookup is enabled when reading an object model definition. When enabled, classes declared as native are mapped to the corresponding Java class.

        Initially this property is false.

        Specified by:
        isJavaClassLookupEnabled in interface IlrSerializer
      • setJavaClassLookupEnabled

        public void setJavaClassLookupEnabled(boolean classLookupEnabled)
        Enables or disables Java class lookup.
        Specified by:
        setJavaClassLookupEnabled in interface IlrSerializer
      • isCompactMode

        public boolean isCompactMode()
        Returns true if compact mode is enabled when writing an object model. When enabled classes bound to actual Java classes (those for which IlrType.getJavaClass has a non null return value) are not written to the output stream by the writeObjectModel method.

        Note that when reading streams that were produced in compact mode, Java class lookup must be enabled (see setJavaClassLookupEnabled.

        Initially this property is not enabled.

        Specified by:
        isCompactMode in interface IlrSerializer
      • setCompactMode

        public void setCompactMode(boolean compactMode)
        Sets compact mode to compactMode.
        Specified by:
        setCompactMode in interface IlrSerializer

© Copyright IBM Corp. 1987, 2017