jef.dna.attributes
Interface EnclosingMethodAttribute

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

public interface EnclosingMethodAttribute
extends Attribute

This interface represents the EnclosingMethod attribute defined by the Java class file specification.
The EnclosingMethodattribute is an optional fixed-length attribute in the attributes table of the ClassFile (�4.2) structure. Aclass must have an EnclosingMethodattributeif andonlyif it isalocal classor ananonymous class. A class may have no more than oneEnclosingMethod attribute.

Author:
frusso

Method Summary
 int getClassIndex()
          Thevalue of theclass_index item must be a valid index into the constant_pool table.
 int getMethodIndex()
          If the current class is not immediately enclosed by a method or constructor, then the value of themethod_index item must be zero.
 void setClassIndex(int cIndx)
          Thevalue of theclass_index item must be a valid index into the constant_pool table.
 void setMethodIndex(int mIndx)
          If the current class is not immediately enclosed by a method or constructor, then the value of themethod_index item must be zero.
 
Methods inherited from interface jef.dna.attributes.Attribute
clone, fromStream, getDna, getLength, getNameIndex, setDna, setNameIndex, toStream, updateRefs, validate
 
Methods inherited from interface jef.dna.util.BytesCountable
getBytesCount
 

Method Detail

setClassIndex

void setClassIndex(int cIndx)
Thevalue of theclass_index item must be a valid index into the constant_pool table. Theconstant_pool entry at that index mustbea CONSTANT_Class_info (�4.5.1) structure representing the innermost class that encloses the declaration of the current class.


getClassIndex

int getClassIndex()
Thevalue of theclass_index item must be a valid index into the constant_pool table. Theconstant_pool entry at that index mustbea CONSTANT_Class_info (�4.5.1) structure representing the innermost class that encloses the declaration of the current class.


setMethodIndex

void setMethodIndex(int mIndx)
If the current class is not immediately enclosed by a method or constructor, then the value of themethod_index item must be zero. Otherwise, the value of themethod_index item must be a valid index into theconstant_pool table. Theconstant_pool entry at that index must be a CONSTANT_NameAndType_info (�4.5.6) structure representing the name and type of a method in the class referenced by the class_index attribute above. It is the responsibility of the Java compiler to ensure that the method identified via themethod_index is indeed the closest lexically enclosing method of the class that contains this EnclosingMethod attribute.


getMethodIndex

int getMethodIndex()
If the current class is not immediately enclosed by a method or constructor, then the value of themethod_index item must be zero. Otherwise, the value of themethod_index item must be a valid index into theconstant_pool table. Theconstant_pool entry at that index must be a CONSTANT_NameAndType_info (�4.5.6) structure representing the name and type of a method in the class referenced by the class_index attribute above. It is the responsibility of the Java compiler to ensure that the method identified via themethod_index is indeed the closest lexically enclosing method of the class that contains this EnclosingMethod attribute.