public interface ClassLoaderWriter
Modifier and Type | Method and Description |
---|---|
boolean |
delete(java.lang.String path)
Delete the class/resource
|
java.lang.ClassLoader |
getClassLoader()
Get a dynamic class loader.
|
java.io.InputStream |
getInputStream(java.lang.String path)
Get the input stream for a class or resource handled
by the underlying class loader.
|
long |
getLastModified(java.lang.String path)
Return the last modified for the class or resource.
|
java.io.OutputStream |
getOutputStream(java.lang.String path)
Get the output stream for a class or resource handled
by the underlying class loader.
|
boolean |
rename(java.lang.String oldPath,
java.lang.String newPath)
Rename a class/resource.
|
java.io.OutputStream getOutputStream(java.lang.String path)
path
- The path of the class/resource. The path should be
absolute like /com/my/domain/HelloWorld.classjava.io.InputStream getInputStream(java.lang.String path) throws java.io.IOException
path
- The path of the class/resource. The path should be
absolute like /com/my/domain/HelloWorld.classjava.io.IOException
- If the resource/class does not exist.long getLastModified(java.lang.String path)
path
- The path of the class/resource. The path should be
absolute like /com/my/domain/HelloWorld.class-1
if
the information can't be detected.boolean delete(java.lang.String path)
path
- The path of the class/resource. The path should be
absolute like /com/my/domain/HelloWorld.classtrue
if the resource exists and could be deleted,
false
otherwise.boolean rename(java.lang.String oldPath, java.lang.String newPath)
oldPath
- The path of the class/resource.newPath
- The new path.true
if the renaming has been successful.java.lang.ClassLoader getClassLoader()
DynamicClassLoaderManager
.
The class loader returned by this method should not be cached, as it might
get stale (e.g. used classes are removed etc.). Therefore each time a newly
generated class is loaded, the class loader should be fetched again using
this method.
The implementation might cache the class loader and return the same loader
on subsequent calls for as long as possible.
Clients of the class loader can use the DynamicClassLoader.isLive()
method to check if the fetched instance can still be used.DynamicClassLoader
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"