org.objectweb.fractal.julia.asm
Interface ClassGenerator
- All Known Implementing Classes:
- AbstractClassGenerator, AttributeControllerClassGenerator, ContextClassGenerator, InterceptorClassGenerator, InterfaceClassGenerator, MergeClassGenerator, MixinClassGenerator
public interface ClassGenerator
The interface that all Julia's class generators must implement.
generateClass
byte[] generateClass(String name,
Tree args,
Loader loader,
ClassLoader classLoader)
throws ClassGenerationException
- Generates the class whose descriptor is given, with the given name. The
generated class must implement the
Generated
interface, and its getFcGeneratorParameters
method must return args.toString().
- Parameters:
name
- the name of the class to be generated.args
- the descriptor of the class to be generated. This
descriptor must be of the form "(objectDescriptor arg1 ...
argN)" (see loadClass
).loader
- the loader to be used to load or generate auxiliary classes,
if needed.classLoader
- the class loader to be used to load auxiliary classes,
if needed.
- Returns:
- a class named name and whose content is described by the
given class descriptor.
- Throws:
ClassGenerationException
- if a problem occurs during the generation
of the class.