01: /*
02: * $Id: CompiledNamespace.java,v 1.3 2002/09/16 08:05:04 jkl Exp $
03: *
04: * Copyright (c) 2002 Njet Communications Ltd. All Rights Reserved.
05: *
06: * Use is subject to license terms, as defined in
07: * Anvil Sofware License, Version 1.1. See LICENSE
08: * file, or http://njet.org/license-1.1.txt
09: */
10: package anvil.script.compiler;
11:
12: import java.io.IOException;
13: import java.lang.reflect.Field;
14: import java.lang.reflect.Method;
15: import java.util.Enumeration;
16: import anvil.core.Any;
17: import anvil.core.runtime.AnyType;
18: import anvil.core.runtime.AnyFunction;
19: import anvil.doc.Doc;
20: import anvil.script.Scope;
21: import anvil.script.CompilableFunction;
22: import anvil.script.ConstantVariableType;
23: import anvil.script.Type;
24: import anvil.script.MethodType;
25: import anvil.script.InterfaceType;
26: import anvil.script.InterfaceRef;
27: import anvil.java.util.Hashlist;
28:
29: /**
30: * class CompiledNamespace
31: *
32: * @author: Jani Lehtimäki
33: */
34: public class CompiledNamespace extends CompiledScope {
35:
36: public CompiledNamespace(ClassLoader classloader, Scope parent,
37: Class cls, String name, Doc document) {
38: super (parent, cls, name, document);
39: try {
40: putstatic(cls, "_class", this );
41: putstatic(cls, "_type", new AnyType(this ));
42: } catch (Exception e) {
43: anvil.Log.log()
44: .error(
45: "Namespace initialization failed: "
46: + cls.getName(), e);
47: }
48: initializeMembers(classloader);
49: }
50:
51: public int getType() {
52: return NAMESPACE;
53: }
54:
55: }
|