01: /*
02: * $Id: Imported.java,v 1.5 2002/09/16 08:05:03 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;
11:
12: import anvil.doc.Doc;
13: import anvil.codec.ConstantPool;
14:
15: /**
16: * class Imported
17: *
18: * @author: Jani Lehtimäki
19: */
20: public class Imported implements Type {
21:
22: protected Module _script;
23: protected String _name;
24: protected Type _type;
25:
26: public Imported(Module script, String name, Type type) {
27: _script = script;
28: _name = name;
29: _type = type;
30: }
31:
32: public String toString() {
33: return "imported " + _type.toString();
34: }
35:
36: public Type getPointedType() {
37: return _type;
38: }
39:
40: public String getName() {
41: return _name;
42: }
43:
44: public String getQualifiedName() {
45: return _name;
46: }
47:
48: public int getType() {
49: return IMPORT;
50: }
51:
52: public Scope getParent() {
53: return _type.getParent();
54: }
55:
56: public Doc getDocument() {
57: return null;
58: }
59:
60: public int getTypeRef(ConstantPool pool) {
61: return 0;
62: }
63:
64: public Module getModule() {
65: return _script;
66: }
67:
68: }
|