harpoon.IR.RawClass
Class AttributeSynthetic

java.lang.Object
  extended by harpoon.IR.RawClass.Attribute
      extended by harpoon.IR.RawClass.AttributeSynthetic

public class AttributeSynthetic
extends Attribute

Java 1.1 compilers are required, when producing bytecodes, to mark any field or member not directly defined in the source code with an attribute names Synthetic. These hidden fields and methods are synthesized by the compiler in order to implement the scoping of names for inner classes.

The Synthetic attribute is intended to allow tools to avoid displaying these methods and fields unnecessarily.

Version:
$Id: AttributeSynthetic.java,v 1.3 2003/09/05 21:45:16 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
"Inner Classes Specification", AttributeInnerClasses, Attribute, ClassFile

Field Summary
static String ATTRIBUTE_NAME
          The string naming this Attribute type.
 
Fields inherited from class harpoon.IR.RawClass.Attribute
attribute_name_index, parent
 
Constructor Summary
AttributeSynthetic(ClassFile parent, int attribute_name_index)
          Constructor.
 
Method Summary
 long attribute_length()
          The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes.
 void write(ClassDataOutputStream out)
          Write to bytecode stream.
 
Methods inherited from class harpoon.IR.RawClass.Attribute
attribute_name_index, attribute_name, print, read, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTRIBUTE_NAME

public static final String ATTRIBUTE_NAME
The string naming this Attribute type.

See Also:
Constant Field Values
Constructor Detail

AttributeSynthetic

public AttributeSynthetic(ClassFile parent,
                          int attribute_name_index)
Constructor.

Method Detail

attribute_length

public long attribute_length()
Description copied from class: Attribute
The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes.

Specified by:
attribute_length in class Attribute

write

public void write(ClassDataOutputStream out)
           throws IOException
Write to bytecode stream.

Specified by:
write in class Attribute
Throws:
IOException