public class ClasspathLocator extends java.lang.Object implements AssetLocator
ClasspathLocatorlooks up an asset in the classpath. This locator is used by default in all jME3 projects (unless
unregistered). Unlike Java's default resource loading mechanism, the
ClasspathLocatorenforces case-sensitivity on platforms which do not have it such as Windows. Therefore, it is critical to provide a path matching the case of the file on the filesystem. This also ensures that the file can be loaded if it was later included in a
.JARfile instead of a folder.
|Constructor and Description|
|Modifier and Type||Method and Description|
Request to locate an asset.
public void setRootPath(java.lang.String rootPath)
rootPath- The root path where to look for assets. Typically, this method will only be called once for each instance of an asset locator.
public AssetInfo locate(AssetManager manager, AssetKey key)
AssetInfoimplementation provided should have a proper return value for its
manager- for managing assets
key- identifies the asset to be located
AssetInfothat was located, or null if not found.