01: // Copyright (c) Corporation for National Research Initiatives
02:
03: package org.python.compiler;
04:
05: import java.io.*;
06:
07: public class SourceFile extends Attribute {
08: int attName;
09: int filename;
10:
11: public SourceFile(String name, ConstantPool pool)
12: throws IOException {
13: attName = pool.UTF8("SourceFile");
14: filename = pool.UTF8(name);
15: }
16:
17: public void write(DataOutputStream stream) throws IOException {
18: stream.writeShort(attName);
19: stream.writeInt(2);
20: stream.writeShort(filename);
21: }
22: }
|