KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > python > compiler > SourceFile


1 // Copyright (c) Corporation for National Research Initiatives
2

3 package org.python.compiler;
4 import java.io.*;
5
6 public class SourceFile extends Attribute {
7     int attName;
8     int filename;
9
10     public SourceFile(String JavaDoc name, ConstantPool pool) throws IOException {
11         attName = pool.UTF8("SourceFile");
12         filename = pool.UTF8(name);
13     }
14
15     public void write(DataOutputStream stream) throws IOException {
16         stream.writeShort(attName);
17         stream.writeInt(2);
18         stream.writeShort(filename);
19     }
20 }
21
Popular Tags