01: /* ===========================================================================
02: * $RCSfile: FieldInfo.java,v $
03: * ===========================================================================
04: *
05: * RetroGuard -- an obfuscation package for Java classfiles.
06: *
07: * Copyright (c) 1998-2006 Mark Welsh (markw@retrologic.com)
08: *
09: * This program can be redistributed and/or modified under the terms of the
10: * Version 2 of the GNU General Public License as published by the Free
11: * Software Foundation.
12: *
13: * This program is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16: * GNU General Public License for more details.
17: *
18: */
19:
20: package COM.rl.obf.classfile;
21:
22: import java.io.*;
23: import java.util.*;
24:
25: /**
26: * Representation of a field from a class-file.
27: *
28: * @author Mark Welsh
29: */
30: public class FieldInfo extends ClassItemInfo {
31: // Constants -------------------------------------------------------------
32:
33: // Fields ----------------------------------------------------------------
34:
35: // Class Methods ---------------------------------------------------------
36: /**
37: * Create a new FieldInfo from the file format data in the DataInput stream.
38: *
39: * @throws IOException if class file is corrupt or incomplete
40: */
41: public static FieldInfo create(DataInput din, ClassFile cf)
42: throws Exception {
43: if (din == null)
44: throw new IOException("No input stream was provided.");
45: FieldInfo fi = new FieldInfo(cf);
46: fi.read(din);
47: return fi;
48: }
49:
50: // Instance Methods ------------------------------------------------------
51: protected FieldInfo(ClassFile cf) {
52: super(cf);
53: }
54: }
|