com.jme3.asset
クラス AssetKey<T>

java.lang.Object
  上位を拡張 com.jme3.asset.AssetKey<T>
すべての実装されたインタフェース:
Savable
直系の既知のサブクラス:
AudioKey, MaterialKey, ModelKey, ShaderKey, TextureKey

public class AssetKey<T>
extends java.lang.Object
implements Savable

AssetKey is a key that is used to look up a resource from a cache. This class should be immutable.


コンストラクタの概要
AssetKey()
           
AssetKey(java.lang.String name)
           
 
メソッドの概要
 java.lang.Object createClonedInstance(java.lang.Object asset)
          Create a new instance of the asset, based on a prototype that is stored in the cache.
 boolean equals(java.lang.Object other)
           
 java.lang.String getExtension()
           
 java.lang.String getFolder()
           
 java.lang.String getName()
           
 int hashCode()
           
 java.lang.Object postProcess(java.lang.Object asset)
          Do any post-processing on the resource after it has been loaded.
 void read(JmeImporter im)
           
static java.lang.String reducePath(java.lang.String path)
          Removes all relative elements of a path (A/B/..
 boolean shouldCache()
           
 java.lang.String toString()
           
 boolean useSmartCache()
           
 void write(JmeExporter ex)
           
 
クラス java.lang.Object から継承されたメソッド
getClass, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

AssetKey

public AssetKey(java.lang.String name)

AssetKey

public AssetKey()
メソッドの詳細

getName

public java.lang.String getName()

getExtension

public java.lang.String getExtension()
戻り値:
The extension of the AssetKey's name. For example, the name "Interface/Logo/Monkey.png" has an extension of "png".

getFolder

public java.lang.String getFolder()

postProcess

public java.lang.Object postProcess(java.lang.Object asset)
Do any post-processing on the resource after it has been loaded.

パラメータ:
asset -

createClonedInstance

public java.lang.Object createClonedInstance(java.lang.Object asset)
Create a new instance of the asset, based on a prototype that is stored in the cache. Implementations are allowed to return the given parameter as-is if it is considered that cloning is not necessary for that particular asset type.

パラメータ:
asset - The asset to be cloned.
戻り値:
The asset, possibly cloned.

shouldCache

public boolean shouldCache()
戻り値:
True if the asset for this key should be cached. Subclasses should override this method if they want to override caching behavior.

useSmartCache

public boolean useSmartCache()
戻り値:
Should return true, if the asset objects implement the "Asset" interface and want to be removed from the cache when no longer referenced in user-code.

reducePath

public static java.lang.String reducePath(java.lang.String path)
Removes all relative elements of a path (A/B/../C.png and A/./C.png).

パラメータ:
path - The path containing relative elements
戻り値:
A path without relative elements

equals

public boolean equals(java.lang.Object other)
オーバーライド:
クラス java.lang.Object 内の equals

hashCode

public int hashCode()
オーバーライド:
クラス java.lang.Object 内の hashCode

toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString

write

public void write(JmeExporter ex)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
例外:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
例外:
java.io.IOException