com.jme3.asset
Class CloneableAssetProcessor

java.lang.Object
  extended by com.jme3.asset.CloneableAssetProcessor
All Implemented Interfaces:
AssetProcessor

public class CloneableAssetProcessor
extends java.lang.Object
implements AssetProcessor

CloneableAssetProcessor simply calls Object.clone() on assets to clone them. No processing is applied.


Constructor Summary
CloneableAssetProcessor()
           
 
Method Summary
 java.lang.Object createClone(java.lang.Object obj)
          Creates a clone of the given asset.
 java.lang.Object postProcess(AssetKey key, java.lang.Object obj)
          Applies post processing to an asset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloneableAssetProcessor

public CloneableAssetProcessor()
Method Detail

postProcess

public java.lang.Object postProcess(AssetKey key,
                                    java.lang.Object obj)
Description copied from interface: AssetProcessor
Applies post processing to an asset. The method may return an object that is not the same instance as the parameter object, and it could be from a different class.

Specified by:
postProcess in interface AssetProcessor
obj - The asset that was loaded from an AssetLoader.
Returns:
Either the same object with processing applied, or an instance of a new object.

createClone

public java.lang.Object createClone(java.lang.Object obj)
Description copied from interface: AssetProcessor
Creates a clone of the given asset. If no clone is desired, then the same instance can be returned, otherwise, a clone should be created. For example, a clone of a Material should have its own set of unique parameters that can be changed just for that instance, but it may share certain other data if it sees fit (like the Shader).

Specified by:
createClone in interface AssetProcessor
Parameters:
obj - The asset to clone
Returns:
The cloned asset, or the same as the given argument if no clone is needed.