Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Attribute Class Reference

Inheritance diagram for Attribute:
[legend]
Collaboration diagram for Attribute:
[legend]
List of all members.

Public Methods

abstract void accept (Visitor v)
Object clone ()
abstract Attribute copy (ConstantPool constant_pool)
void dump (DataOutputStream file) throws IOException
final ConstantPool getConstantPool ()
final int getLength ()
final int getNameIndex ()
final byte getTag ()
final void setConstantPool (ConstantPool constant_pool)
final void setLength (int length)
final void setNameIndex (int name_index)
String toString ()
abstract void accept (Visitor v)
Object clone ()
abstract Attribute copy (ConstantPool constant_pool)
void dump (DataOutputStream file) throws IOException
final ConstantPool getConstantPool ()
final int getLength ()
final int getNameIndex ()
final byte getTag ()
final void setConstantPool (ConstantPool constant_pool)
final void setLength (int length)
final void setNameIndex (int name_index)
String toString ()

Protected Attributes

int name_index
int length
byte tag
ConstantPool constant_pool

Private Methods

 Attribute (byte tag, int name_index, int length, ConstantPool constant_pool)
 Attribute (byte tag, int name_index, int length, ConstantPool constant_pool)

Static Private Methods

final Attribute readAttribute (DataInputStream file, ConstantPool constant_pool) throws IOException, ClassFormatError, InternalError
final Attribute readAttribute (DataInputStream file, ConstantPool constant_pool) throws IOException, ClassFormatError, InternalError

Detailed Description

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:
Id:
Attribute.java,v 1.1.1.1 2002/01/24 03:44:00 pserver Exp
Author:
M. Dahm
See also:
ConstantValue , SourceFile , Code , Unknown , ExceptionTable , LineNumberTable , LocalVariableTable , InnerClasses , Synthetic , Deprecated

Definition at line 27 of file lib/jpf/de/fub/bytecode/classfile/Attribute.java.


Member Function Documentation

abstract void Attribute::accept Visitor   v [pure virtual]
 

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

Reimplemented in Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, Unknown, Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, and Unknown.

abstract void Attribute::accept Visitor   v [pure virtual]
 

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

Reimplemented in Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, Unknown, Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, and Unknown.

Object Attribute::clone   [inline]
 

Use copy() if you want to have a deep copy(), i.e., with all references copied correctly.

Returns:
shallow copy of this attribute

Definition at line 54 of file src/de/fub/bytecode/classfile/Attribute.java.

Object Attribute::clone   [inline]
 

Use copy() if you want to have a deep copy(), i.e. with all references copied correctly.

Returns:
shallow copy of this attribute

Definition at line 54 of file lib/jpf/de/fub/bytecode/classfile/Attribute.java.

Referenced by Unknown::copy(), Synthetic::copy(), SourceFile::copy(), Signature::copy(), PMGClass::copy(), LocalVariableTable::copy(), LineNumberTable::copy(), InnerClasses::copy(), ExceptionTable::copy(), Deprecated::copy(), ConstantValue::copy(), and Code::copy().

abstract Attribute Attribute::copy ConstantPool   constant_pool [pure virtual]
 

Returns:
deep copy of this attribute

Reimplemented in Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, Unknown, Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, and Unknown.

abstract Attribute Attribute::copy ConstantPool   constant_pool [pure virtual]
 

Returns:
deep copy of this attribute

Reimplemented in Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, Unknown, Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, and Unknown.

Referenced by JavaClass::copy(), Code::copy(), and FieldOrMethod::copy_().

void Attribute::dump DataOutputStream   file [inline]
 

Dump attribute to file stream in binary format.

Parameters:
file   Output file stream
Exceptions:
IOException  

Reimplemented in Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, Unknown, Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, and Unknown.

Definition at line 75 of file src/de/fub/bytecode/classfile/Attribute.java.

void Attribute::dump DataOutputStream   file [inline]
 

Dump attribute to file stream in binary format.

Parameters:
file   Output file stream
Exceptions:
IOException  

Reimplemented in Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, Unknown, Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, and Unknown.

Definition at line 75 of file lib/jpf/de/fub/bytecode/classfile/Attribute.java.

Referenced by JavaClass::dump(), FieldOrMethod::dump(), and Code::dump().

final ConstantPool Attribute::getConstantPool   [inline]
 

Returns:
Constant pool used by this object.
See also:
ConstantPool

Definition at line 84 of file src/de/fub/bytecode/classfile/Attribute.java.

final ConstantPool Attribute::getConstantPool   [inline]
 

Returns:
Constant pool used by this object.
See also:
ConstantPool

Definition at line 84 of file lib/jpf/de/fub/bytecode/classfile/Attribute.java.

Referenced by Code::Code(), ConstantValue::ConstantValue(), Deprecated::Deprecated(), ExceptionTable::ExceptionTable(), InnerClasses::InnerClasses(), LocalVariableTable::LocalVariableTable(), PMGClass::PMGClass(), Signature::Signature(), SourceFile::SourceFile(), Synthetic::Synthetic(), and Unknown::Unknown().

final int Attribute::getLength   [inline]
 

Returns:
Length of attribute field in bytes.

Definition at line 88 of file src/de/fub/bytecode/classfile/Attribute.java.

final int Attribute::getLength   [inline]
 

Returns:
Length of attribute field in bytes.

Definition at line 88 of file lib/jpf/de/fub/bytecode/classfile/Attribute.java.

Referenced by Code::Code(), ConstantValue::ConstantValue(), Deprecated::Deprecated(), ExceptionTable::ExceptionTable(), InnerClasses::InnerClasses(), LocalVariableTable::LocalVariableTable(), PMGClass::PMGClass(), Signature::Signature(), SourceFile::SourceFile(), Synthetic::Synthetic(), and Unknown::Unknown().

final int Attribute::getNameIndex   [inline]
 

Returns:
Name index in constant pool of attribute name.

Definition at line 92 of file src/de/fub/bytecode/classfile/Attribute.java.

final int Attribute::getNameIndex   [inline]
 

Returns:
Name index in constant pool of attribute name.

Definition at line 92 of file lib/jpf/de/fub/bytecode/classfile/Attribute.java.

Referenced by Code::Code(), ConstantValue::ConstantValue(), Deprecated::Deprecated(), ExceptionTable::ExceptionTable(), InnerClasses::InnerClasses(), LocalVariableTable::LocalVariableTable(), PMGClass::PMGClass(), Signature::Signature(), SourceFile::SourceFile(), Synthetic::Synthetic(), and Unknown::Unknown().

final byte Attribute::getTag   [inline]
 

Returns:
Tag of attribute, i.e., its type. Value may not be altered, thus there is no setTag() method.

Definition at line 97 of file src/de/fub/bytecode/classfile/Attribute.java.

final byte Attribute::getTag   [inline]
 

Returns:
Tag of attribute, i.e. its type. Value may not be altered, thus there is no setTag() method.

Definition at line 97 of file lib/jpf/de/fub/bytecode/classfile/Attribute.java.

Referenced by Field::getConstantValue(), and ConstantValue::toString().

final void Attribute::setConstantPool ConstantPool   constant_pool [inline]
 

Parameters:
constant_pool   Constant pool to be used for this object.
See also:
ConstantPool

Definition at line 186 of file src/de/fub/bytecode/classfile/Attribute.java.

final void Attribute::setConstantPool ConstantPool   constant_pool [inline]
 

Parameters:
constant_pool   Constant pool to be used for this object.
See also:
ConstantPool

Definition at line 186 of file lib/jpf/de/fub/bytecode/classfile/Attribute.java.

final void Attribute::setLength int   length [inline]
 

Parameters:
Attribute   length in bytes.

Definition at line 192 of file src/de/fub/bytecode/classfile/Attribute.java.

final void Attribute::setLength int   length [inline]
 

Parameters:
Attribute   length in bytes.

Definition at line 192 of file lib/jpf/de/fub/bytecode/classfile/Attribute.java.

final void Attribute::setNameIndex int   name_index [inline]
 

Parameters:
name_index   of attribute.

Definition at line 198 of file src/de/fub/bytecode/classfile/Attribute.java.

final void Attribute::setNameIndex int   name_index [inline]
 

Parameters:
name_index   of attribute.

Definition at line 198 of file lib/jpf/de/fub/bytecode/classfile/Attribute.java.

String Attribute::toString   [inline]
 

Returns:
attribute name.

Reimplemented in Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, Unknown, Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, and Unknown.

Definition at line 204 of file src/de/fub/bytecode/classfile/Attribute.java.

String Attribute::toString   [inline]
 

Returns:
attribute name.

Reimplemented in Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, Unknown, Code, ConstantValue, Deprecated, ExceptionTable, InnerClasses, LineNumberTable, LocalVariableTable, PMGClass, Signature, SourceFile, Synthetic, and Unknown.

Definition at line 204 of file lib/jpf/de/fub/bytecode/classfile/Attribute.java.

Referenced by Method::toString(), LocalVariableTable::toString(), LineNumberTable::toString(), InnerClasses::toString(), Field::toString(), and Code::toString().


The documentation for this class was generated from the following files:
Generated at Thu Feb 7 07:05:02 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001