01: /*
02: * Copyright 2006 Ethan Nicholas. All rights reserved.
03: * Use is subject to license terms.
04: */
05: package jaxx.compiler;
06:
07: import jaxx.reflect.*;
08:
09: /** A dummy CompiledObject which serves to initialize scripted field. This is handled by
10: * a CompiledObject rather than (say) simply inlining the initialization code in order to
11: * ensure that the field is initialized in document order.
12: */
13: public class ScriptInitializer extends CompiledObject {
14: public ScriptInitializer(String initializer, JAXXCompiler compiler) {
15: super (compiler.getAutoId(ClassDescriptorLoader
16: .getClassDescriptor(ScriptInitializer.class)),
17: ClassDescriptorLoader
18: .getClassDescriptor(ScriptInitializer.class),
19: compiler, false);
20: appendInitializationCode(initializer);
21: }
22: }
|