Class MapResourceCreator
java.lang.Object
org.codehaus.commons.compiler.util.resource.MapResourceCreator
- All Implemented Interfaces:
ResourceCreator
Creates resources as byte arrays in a delegate
Map
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal OutputStream
createResource
(String resourceName) Creates the designated resource.final boolean
deleteResource
(String resourceName) Deletes the resource with the given name.getMap()
-
Field Details
-
map
-
-
Constructor Details
-
MapResourceCreator
public MapResourceCreator()Auto-create the delegateMap
. -
MapResourceCreator
- Parameters:
map
- String fileName => byte[] data
-
-
Method Details
-
getMap
- Returns:
- The
String
-to-byte[]
map of the resources created
-
createResource
Description copied from interface:ResourceCreator
Creates the designated resource.- Specified by:
createResource
in interfaceResourceCreator
- Parameters:
resourceName
- Designates the resource; typically structured by slashes ("/") like "com/foo/pkg/Bar.class
"- Returns:
- Bytes written to this
OutputStream
are stored in the resource
-
deleteResource
Description copied from interface:ResourceCreator
Deletes the resource with the given name.- Specified by:
deleteResource
in interfaceResourceCreator
- Returns:
false
if the resource could not be deleted
-