KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > javaguard > classfile > UnknownAttrInfo


1 /**
2  * JavaGuard -- an obfuscation package for Java classfiles.
3  *
4  * Copyright (c) 2002 Thorsten Heit (theit@gmx.de)
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  * The author may be contacted at theit@gmx.de.
21  *
22  *
23  * $Id: UnknownAttrInfo.java,v 1.1 2002/05/08 11:49:16 glurk Exp $
24  */

25 package net.sf.javaguard.classfile;
26
27 import java.io.*;
28
29
30 /** Representation of an unknown attribute.
31  *
32  * @author <a HREF="mailto:theit@gmx.de">Thorsten Heit</a>
33  */

34 public class UnknownAttrInfo extends AttrInfo {
35   /** Default constructor that creates an AttrInfo object.
36    * @param cf the class file the object belongs to
37    * @param attrNameIndex index into the constant pool
38    * @param attrLength the length of the additional info data in the class file
39    */

40   protected UnknownAttrInfo(ClassFile cf, int attrNameIndex, int attrLength) {
41     super(cf, attrNameIndex, attrLength);
42   }
43   
44   
45   
46   
47   /** Return the string name of the attribute.
48    * @return string name of the attribute
49    */

50   protected String JavaDoc getAttrName() {
51     return ATTR_Unknown;
52   }
53   
54   
55   
56   
57   /** Dump the content of the entry to the specified file (used for debugging).
58    * @param pw the print writer
59    * @param cf the class file the element belongs to
60    */

61   public void dump(PrintWriter pw, ClassFile cf) {
62     pw.println(getAttrName());
63   }
64 }
65
Popular Tags