Class ClassAsset
java.lang.Object
org.jboss.shrinkwrap.api.asset.ClassAsset
- All Implemented Interfaces:
Asset
- Author:
- Aslak Knutsen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?> Returns the loaded class.Converts the Class name into a Resource URL and uses the ClassloaderResource for loading the Class.
-
Constructor Details
-
ClassAsset
Load any class as a resource.- Parameters:
clazz- The class to load- Throws:
IllegalArgumentException- Class can not be null
-
-
Method Details
-
openStream
Converts the Class name into a Resource URL and uses the ClassloaderResource for loading the Class.- Specified by:
openStreamin interfaceAsset- Returns:
- A new open
InputStreamfor each call
-
getSource
Returns the loaded class.
-