KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > gjt > jclasslib > structures > attributes > SyntheticAttribute


1 /*
2     This library is free software; you can redistribute it and/or
3     modify it under the terms of the GNU General Public
4     License as published by the Free Software Foundation; either
5     version 2 of the license, or (at your option) any later version.
6 */

7
8 package org.gjt.jclasslib.structures.attributes;
9
10 import org.gjt.jclasslib.structures.AttributeInfo;
11 import org.gjt.jclasslib.structures.InvalidByteCodeException;
12
13 import java.io.*;
14
15 /**
16     Describes a <tt>Synthetic</tt> attribute structure.
17
18     @author <a HREF="mailto:jclasslib@ej-technologies.com">Ingo Kegel</a>
19     @version $Revision: 1.4 $ $Date: 2003/08/18 07:52:05 $
20 */

21 public class SyntheticAttribute extends AttributeInfo {
22
23     /** Name of the attribute as in the corresponding constant pool entry. */
24     public static final String JavaDoc ATTRIBUTE_NAME = "Synthetic";
25
26     private static final int LENGTH = 0;
27     
28     public void read(DataInput in)
29         throws InvalidByteCodeException, IOException {
30             
31         if (debug) debug("read ");
32     }
33
34     public void write(DataOutput out)
35         throws InvalidByteCodeException, IOException {
36         
37         super.write(out);
38         if (debug) debug("wrote ");
39     }
40
41     public int getAttributeLength() {
42         return LENGTH;
43     }
44
45     protected void debug(String JavaDoc message) {
46         super.debug(message + "Synthetic attribute");
47     }
48
49 }
50
Popular Tags