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
-
length
-
-
name_index
-
-
tag
-
-
Attribute()
-
-
accept(Visitor)
- Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class.
-
dump(DataOutputStream)
- Dump attribute to file stream in binary format.
-
getLength()
-
-
getNameIndex()
-
-
getTag()
-
-
setLength(int)
-
-
setNameIndex(short)
-
name_index
protected short name_index
length
protected int length
tag
protected byte tag
Attribute
public Attribute()
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
dump
public void dump(DataOutputStream file) throws IOException
- Dump attribute to file stream in binary format.
- Parameters:
- file - Output file stream
getLength
public final int getLength()
- Returns:
- Length of attribute field in bytes.
getNameIndex
public final short getNameIndex()
- Returns:
- Name index in constant pool of attribute name.
getTag
public final byte getTag()
- Returns:
- Tag of attribute, i.e. its type. Value may not be altered, thus
there is no setTag() method.
setLength
public final void setLength(int length)
- Parameters:
- Attribute - length in bytes.
setNameIndex
public final void setNameIndex(short name_index)
- Parameters:
- name_index - of attribute.
All Packages Class Hierarchy This Package Previous Next Index