org.apache.ode.bpel.engine

## Class ReplacementMapImpl

- java.lang.Object
- - org.apache.ode.bpel.engine.ReplacementMapImpl

- All Implemented Interfaces:
    ReplacementMap

      public class ReplacementMapImpl
      extends java.lang.Object
      implements ReplacementMap

  A JACOB `ReplacementMap` implementation that eliminates unnecessary serialization of the (constant) compiled process model.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ReplacementMapImpl.OBaseReplacementImpl` Replacement object for serializtation of the `OBase` (compiled BPEL) objects in the JACOB VPU.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReplacementMapImpl(OProcess oprocess)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getOriginal(java.lang.Object replacement)` Get the original object for a given replacement object.
    `java.lang.Object` | `getReplacement(java.lang.Object original)` Get a replacement object for a given "original" object.
    `boolean` | `isReplaceable(java.lang.Object obj)` Determine whether the given object is an object for which a replacement can be obtained.
    `boolean` | `isReplacement(java.lang.Object obj)` Determine whether the given object is a replacement object obtained from this map.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ReplacementMapImpl

          public ReplacementMapImpl(OProcess oprocess)

  - ### Method Detail

    - #### isReplacement

          public boolean isReplacement(java.lang.Object obj)

      Description copied from interface: `ReplacementMap`
      Determine whether the given object is a replacement object obtained from this map.
      Specified by:
        `isReplacement` in interface `ReplacementMap`
      Parameters:
        `obj` - object to test
      Returns:
        `true` if this `ReplacementMap.getReplacement(Object)` returned this object, `false` otherwise

    - #### getOriginal

          public java.lang.Object getOriginal(java.lang.Object replacement)
                                       throws java.lang.IllegalArgumentException

      Description copied from interface: `ReplacementMap`
      Get the original object for a given replacement object.
      Specified by:
        `getOriginal` in interface `ReplacementMap`
      Returns:
        the original for the given replacement
      Throws:
        `java.lang.IllegalArgumentException` - if the given object is not a replacement object

    - #### getReplacement

          public java.lang.Object getReplacement(java.lang.Object original)
                                          throws java.lang.IllegalArgumentException

      Description copied from interface: `ReplacementMap`
      Get a replacement object for a given "original" object.
      Specified by:
        `getReplacement` in interface `ReplacementMap`
      Parameters:
        `original` - "original" object
      Returns:
        replacement object
      Throws:
        `java.lang.IllegalArgumentException` - if the map cannot generate a replacement for the object

    - #### isReplaceable

          public boolean isReplaceable(java.lang.Object obj)

      Description copied from interface: `ReplacementMap`
      Determine whether the given object is an object for which a replacement can be obtained.
      Specified by:
        `isReplaceable` in interface `ReplacementMap`
      Parameters:
        `obj` - object to test
      Returns:
        `true` if the call to `ReplacementMap.getReplacement(Object)` will succeed, `false` otherwise