All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class DE.fub.inf.JVM.JavaClass.Attribute

java.lang.Object
   |
   +----DE.fub.inf.JVM.JavaClass.Attribute

public abstract class Attribute
extends Object
implements Constants
Abstract super class for Attribute objects. Currently the ConstantValue, SourceFile, Code, Exceptiontable, LineNumberTable, LocalVariableTable, InnerClasses and Synthetic attributes are supported. The Unknown attribute stands for non-standard-attributes.

Version:
970922
Author:
M. Dahm
See Also:
ConstantValue, SourceFile, Code, Unknown, ExceptionTable, LineNumberTable, LocalVariableTable, InnerClasses, Synthetic, Deprecated

Variable Index

 o length
 o name_index
 o tag

Constructor Index

 o Attribute()

Method Index

 o accept(Visitor)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
 o dump(DataOutputStream)
Dump attribute to file stream in binary format.
 o getLength()
 o getNameIndex()
 o getTag()
 o setLength(int)
 o setNameIndex(short)

Variables

 o name_index
 protected short name_index
 o length
 protected int length
 o tag
 protected byte tag

Constructors

 o Attribute
 public Attribute()

Methods

 o accept
 public abstract void accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.

Parameters:
v - Visitor object
 o dump
 public void dump(DataOutputStream file) throws IOException
Dump attribute to file stream in binary format.

Parameters:
file - Output file stream
 o getLength
 public final int getLength()
Returns:
Length of attribute field in bytes.
 o getNameIndex
 public final short getNameIndex()
Returns:
Name index in constant pool of attribute name.
 o getTag
 public final byte getTag()
Returns:
Tag of attribute, i.e. its type. Value may not be altered, thus there is no setTag() method.
 o setLength
 public final void setLength(int length)
Parameters:
Attribute - length in bytes.
 o setNameIndex
 public final void setNameIndex(short name_index)
Parameters:
name_index - of attribute.

All Packages  Class Hierarchy  This Package  Previous  Next  Index