KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonicsystems > jarjar > util > GetNameClassWriter


1 /*
2   Jar Jar Links - A utility to repackage and embed Java libraries
3   Copyright (C) 2004 Tonic Systems, Inc.
4
5   This program is free software; you can redistribute it and/or modify
6   it under the terms of the GNU General Public License as published by
7   the Free Software Foundation; either version 2 of the License, or
8   (at your option) any later version.
9
10   This program is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13   GNU General Public License for more details.
14
15   You should have received a copy of the GNU General Public License
16   along with this program; see the file COPYING. if not, write to
17   the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18   Boston, MA 02111-1307 USA
19 */

20
21 package com.tonicsystems.jarjar.util;
22
23 import org.objectweb.asm.ClassWriter;
24 import org.objectweb.asm.ClassReader;
25 import java.io.*;
26
27 public class GetNameClassWriter extends ClassWriter
28 {
29     private String JavaDoc className;
30     
31     public GetNameClassWriter(boolean computeMaxs) {
32         super(computeMaxs);
33     }
34
35     public void visit(int version, int access, String JavaDoc name, String JavaDoc signature, String JavaDoc superName, String JavaDoc[] interfaces) {
36         className = name;
37         super.visit(version, access, name, signature, superName, interfaces);
38     }
39     
40     public String JavaDoc getClassName() {
41         return className;
42     }
43 }
44
Popular Tags