jef.dna.attributes
Interface InnerClassesTableEntry

All Superinterfaces:
BytesCountable, java.lang.Cloneable
All Known Implementing Classes:
InnerClassesTableEntry

public interface InnerClassesTableEntry
extends java.lang.Cloneable, BytesCountable

Class representing an Inner Classes instance's table entry.

Author:
Francesco Russo frusso@cs.unibo.it

Method Summary
 java.lang.Object clone()
           
 void fromStream(java.io.DataInputStream dis)
          Populates the current InnerClassesTableEntry instance with the given DataInputStream.
 InnerClassesAttribute getAttributeContainer()
          Get the attribute containing the InnerClassesTableEntry
 int getInnerClassAccessFlags()
          Returns the access flags set via the setInnerClassAccessFlags method.
 int getInnerClassInfoIndex()
          The value of the inner_class_info_index item must be zero or a valid index into the constant_pool table.
 int getInnerNameIndex()
          If the inner class is anonymous, the value of the inner_name_index item must be zero.
 int getOuterClassInfoIndex()
          If the inner class is not a member, the value of the outer_class_info_index item must be zero.
 void setAttributeContainer(InnerClassesAttribute attr)
          Set the attribute containing the InnerClassesTableEntry
 void setInnerClassAccesFlags(int accessFlags)
          The value of the inner_class_access_flags item is a mask of flags used to denote access permissions to and properties of class or interface as declared in the source code from which this class file was compiled.
 void setInnerClassInfoIndex(int innClassInfoIndex)
          The value of the inner_class_info_index item must be zero or a valid index into the constant_pool table.
 void setInnerNameIndex(int innNameIndex)
          If the inner class is anonymous, the value of the inner_name_index item must be zero.
 void setOuterClassInfoIndex(int outClassInfoIndex)
          If the inner class is not a member, the value of the outer_class_info_index item must be zero.
 void toStream(java.io.DataOutputStream dos)
          Serializes the current InnerClassesTableEntry to the given DataOutputStream.
 void updateRefs(int offset)
          Updates all the references to constant pool table entries by the given offset.
 void validate()
          Perform validation over the InnerClassesTableEntry
 
Methods inherited from interface jef.dna.util.BytesCountable
getBytesCount
 

Method Detail

setInnerClassInfoIndex

void setInnerClassInfoIndex(int innClassInfoIndex)
The value of the inner_class_info_index item must be zero or a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Class_info structure representing the inner class. The remaining items in the classes array entry give information about the inner class itself.

Parameters:
innClassInfoIndex - A valid index into the constant pool table

getInnerClassInfoIndex

int getInnerClassInfoIndex()
The value of the inner_class_info_index item must be zero or a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Class_info structure representing the inner class. The remaining items in the classes array entry give information about the inner class itself.

Returns:
int A valid index into the constant pool table

setOuterClassInfoIndex

void setOuterClassInfoIndex(int outClassInfoIndex)
If the inner class is not a member, the value of the outer_class_info_index item must be zero. Otherwise, the value of the outer_class_info_index item must be a valid index into the constant_pool table, and the entry at that index must be a CONSTANT_Class_info structure representing the class or interface of which the inner class is a member

Parameters:
outClassInfoIndex - A valid index into the constant pool table

getOuterClassInfoIndex

int getOuterClassInfoIndex()
If the inner class is not a member, the value of the outer_class_info_index item must be zero. Otherwise, the value of the outer_class_info_index item must be a valid index into the constant_pool table, and the entry at that index must be a CONSTANT_Class_info structure representing the class or interface of which the inner class is a member

Returns:
int A valid index into the constant pool table

setInnerNameIndex

void setInnerNameIndex(int innNameIndex)
If the inner class is anonymous, the value of the inner_name_index item must be zero. Otherwise, the value of the inner_name_index item must be a valid index into the constant_pool table, and the entry at that index must be a CONSTANT_Utf8_info structure that represents the original simple name of the inner class, as given in the source code from which this class file was compiled

Parameters:
innNameIndex - A valid index into the constant pool table

getInnerNameIndex

int getInnerNameIndex()
If the inner class is anonymous, the value of the inner_name_index item must be zero. Otherwise, the value of the inner_name_index item must be a valid index into the constant_pool table, and the entry at that index must be a CONSTANT_Utf8_info structure that represents the original simple name of the inner class, as given in the source code from which this class file was compiled

Returns:
int A valid index into the constant pool table

setInnerClassAccesFlags

void setInnerClassAccesFlags(int accessFlags)
The value of the inner_class_access_flags item is a mask of flags used to denote access permissions to and properties of class or interface as declared in the source code from which this class file was compiled. It is used by compilers to recover the original information when source code is not available. The flags are:
Flag Name Value Meaning
ACC_PUBLIC 0x0001 Marked or implicitly public in source.
ACC_PRIVATE 0x0002 Marked private in source.
ACC_PROTECTED 0x0004 Marked protected in source.
ACC_STATIC 0x0008 Marked or implicitly static in source.
ACC_FINAL 0x0010 Marked final in source.
ACC_INTERFACE 0x0200 Was an interface in source.
ACC_ABSTRACT 0x0400 Marked or implicitly abstract in source.

Parameters:
accessFlags - A bit mask denoting the which access modifiers are applied to the given class

getInnerClassAccessFlags

int getInnerClassAccessFlags()
Returns the access flags set via the setInnerClassAccessFlags method.

Returns:
int The bit mask of the access flags defines by the following table
Flag Name Value Meaning
ACC_PUBLIC 0x0001 Marked or implicitly public in source.
ACC_PRIVATE 0x0002 Marked private in source.
ACC_PROTECTED 0x0004 Marked protected in source.
ACC_STATIC 0x0008 Marked or implicitly static in source.
ACC_FINAL 0x0010 Marked final in source.
ACC_INTERFACE 0x0200 Was an interface in source.
ACC_ABSTRACT 0x0400 Marked or implicitly abstract in source.

setAttributeContainer

void setAttributeContainer(InnerClassesAttribute attr)
Set the attribute containing the InnerClassesTableEntry

Parameters:
attr - The instance containing the current InnerClassesTableEntry

getAttributeContainer

InnerClassesAttribute getAttributeContainer()
Get the attribute containing the InnerClassesTableEntry

Returns:
InnerClassesTableEntry The instance containing the current InnerClassesTableEntry

fromStream

void fromStream(java.io.DataInputStream dis)
                throws java.io.IOException
Populates the current InnerClassesTableEntry instance with the given DataInputStream.

Parameters:
dis - The stream from which the current instance has to be populated
Throws:
java.io.IOException - Something went wrong with the provided input stream

toStream

void toStream(java.io.DataOutputStream dos)
              throws java.io.IOException
Serializes the current InnerClassesTableEntry to the given DataOutputStream.

Parameters:
dos - The stream over which the current instance has to be serialized
Throws:
java.io.IOException - Something went wrong with the provided output stream

updateRefs

void updateRefs(int offset)
Updates all the references to constant pool table entries by the given offset.

Parameters:
offset - The offset to be used

validate

void validate()
              throws MissingAttributeContainerException,
                     MissingDnaContainerException,
                     MissingCPTableException,
                     InnerClassesTableEntryValidationException
Perform validation over the InnerClassesTableEntry

Throws:
MissingAttributeContainerException
MissingDnaContainerException
MissingDnaContainerException
InnerClassesTableEntryValidationException
MissingCPTableException

clone

java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException