Class EnclosingMethodAttr
java.lang.Object
org.openjdk.asmtools.jasm.AttrData
org.openjdk.asmtools.jasm.EnclosingMethodAttr
- All Implemented Interfaces:
ConstantPoolDataVisitor, DataWriter
EnclosingMethod_attribute {
u2 attribute_name_index;
u4 attribute_length;
u2 class_index;
u2 method_index;
}
If the current class is not immediately enclosed by a method or constructor,
then the value of the method_index item must be zero.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEnclosingMethodAttr(ConstantPool pool, ConstCell classCell, ConstCell methodCell) -
Method Summary
Modifier and TypeMethodDescriptionintprotected ConstCell<?> classifyConstCell(ConstantPool pool, ConstCell<?> cell) voidMethods inherited from class AttrData
getAttribute, getLength, visitMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConstantPoolDataVisitor
visitConstCell, visitDataMethods inherited from interface DataWriter
isCountable
-
Field Details
-
pool
-
classCell
-
methodCell
-
-
Constructor Details
-
EnclosingMethodAttr
EnclosingMethodAttr(ConstantPool pool, ConstCell classCell, ConstCell methodCell) - Parameters:
pool- ConstantPoolclassCell- class_index to be written to class filemethodCell- method_index If the current class is not immediately enclosed by a method or constructor, then the value of the method_index item must be zero.
-
-
Method Details
-
attrLength
public int attrLength()- Overrides:
attrLengthin classAttrData
-
classifyConstCell
- Overrides:
classifyConstCellin classAttrData
-
write
- Specified by:
writein interfaceDataWriter- Overrides:
writein classAttrData- Throws:
IOException
-