Class AssetUtil
java.lang.Object
org.jboss.shrinkwrap.impl.base.asset.AssetUtil
AssetUtil
Util class to help extract name/paths from Assets.
- Version:
- $Revision: $
- Author:
- Aslak Knutsen
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetClassLoaderResourceName(Package resourcePackage, String resourceName) Helper to convert from java package name to class loader package name
i.e.: javax.test + my.txt = javax/test/ + my.txtstatic ArchivePathgetFullPathForClassResource(Class<?> clazz) Helper to extract a ClassResources full path.static ArchivePathgetFullPathForClassResource(String className) Helper to extract a ClassResources full path.static StringgetNameForClassloaderResource(String resourceName) Helper to extract a ClassloaderResources name.static ArchivePathgetPathForClassloaderResource(String resourceName) Helper to extract a ClassloaderResources path information.
-
Field Details
-
DELIMITER_CLASS_NAME_PATH
-
DELIMITER_RESOURCE_PATH
The delimiter used for classes represented in resource form.- See Also:
-
-
Method Details
-
getPathForClassloaderResource
Helper to extract a ClassloaderResources path information.
ie: /user/test/file.properties = /user/test/- Parameters:
resourceName- The name of the resource- Returns:
- A Path representation of the give resource
-
getClassLoaderResourceName
Helper to convert from java package name to class loader package name
i.e.: javax.test + my.txt = javax/test/ + my.txt- Parameters:
resourcePackage- The base packageresourceName- The resource inside the package.- Returns:
ClassLoaderresource location
-
getNameForClassloaderResource
-
getFullPathForClassResource
Helper to extract a ClassResources full path.
ie: package.MyClass = package/MyClass.class- Parameters:
clazz- The class whose resource path is to be extracted.- Returns:
- An
ArchivePathrepresenting the full path of the class resource.
-
getFullPathForClassResource
Helper to extract a ClassResources full path.
ie: package.MyClass = package/MyClass.class- Parameters:
className- The name of the class whose resource path is to be extracted.- Returns:
- An
ArchivePathrepresenting the full path of the class resource.
-