Mail Archive Home | asm List | November 2008 Index
| <-- Date Index --> | <-- Thread Index --> |
A ClassLoader that, unlike usual ClassLoaders,
does not load byte code, but reads JavaTM source code and then scans, parses,
compiles and loads it into the virtual machine.
"""
What is JavaSourceClassLoader? If that thing creates some bytecode you probably should dig into its code and see if it allows to save generated classes to the file system.
regards,
Eugene
Maxim Veksler wrote:
Hello Everyone,
I'm looking for a solution that would allow me to write class object
back to it's bytecode from, which will be later saved to the FS.
The real motivation is to enable DynamicBeans, which get complied
during system runtime.
The process is:
1. Create dynamic java code which describes a Bean class.
2. Compile the class and load it using a classloader.
I'm currently using Janino's :
"""
cl = new JavaSourceClassLoader(
this.getClass().getClassLoader(), // parentClassLoader
pathFiles, // optionalSourcePath
"UTF8", // optionalCharacterEncoding
DebuggingInformation.ALL // debuggingInformation
"""
My problem now comes to the issue of enabling the WebAppClassloader to
load these classes.
I've seen ASM has a ClassWriter object which seems to be able to
perform exactly what I'm after, but I'm failing to use it - Either
from a loaded class or directly from .java code.
Help is very much appreciated.
Maxim.
--
You receive this message as a subscriber of the asm@xxxxxxx mailing list.
To unsubscribe: mailto:asm-unsubscribe@xxxxxxx
For general help: mailto:sympa@xxxxxxx?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.