java.lang.Object
org.glavo.classfile.impl.AbstractElement
org.glavo.classfile.impl.BoundAttribute<CodeAttribute>
org.glavo.classfile.impl.BoundAttribute.BoundCodeAttribute
- All Implemented Interfaces:
Iterable<CodeElement>,Attribute<CodeAttribute>,CodeAttribute,AttributedElement,ClassFileElement,CodeModel,CompoundElement<CodeElement>,MethodElement,WritableElement<CodeAttribute>
- Direct Known Subclasses:
CodeImpl
- Enclosing class:
BoundAttribute<T extends Attribute<T>>
public abstract static sealed class BoundAttribute.BoundCodeAttribute
extends BoundAttribute<CodeAttribute>
implements CodeAttribute
permits CodeImpl
-
Nested Class Summary
Nested classes/interfaces inherited from class org.glavo.classfile.impl.BoundAttribute
BoundAttribute.BoundAnnotationDefaultAttr, BoundAttribute.BoundBootstrapMethodsAttribute, BoundAttribute.BoundCharacterRangeTableAttribute, BoundAttribute.BoundCodeAttribute, BoundAttribute.BoundCompilationIDAttribute, BoundAttribute.BoundConstantValueAttribute, BoundAttribute.BoundDeprecatedAttribute, BoundAttribute.BoundEnclosingMethodAttribute, BoundAttribute.BoundExceptionsAttribute, BoundAttribute.BoundInnerClassesAttribute, BoundAttribute.BoundLineNumberTableAttribute, BoundAttribute.BoundLocalVariableTableAttribute, BoundAttribute.BoundLocalVariableTypeTableAttribute, BoundAttribute.BoundMethodParametersAttribute, BoundAttribute.BoundModuleAttribute, BoundAttribute.BoundModuleHashesAttribute, BoundAttribute.BoundModuleMainClassAttribute, BoundAttribute.BoundModulePackagesAttribute, BoundAttribute.BoundModuleResolutionAttribute, BoundAttribute.BoundModuleTargetAttribute, BoundAttribute.BoundNestHostAttribute, BoundAttribute.BoundNestMembersAttribute, BoundAttribute.BoundPermittedSubclassesAttribute, BoundAttribute.BoundRecordAttribute, BoundAttribute.BoundRuntimeInvisibleAnnotationsAttribute, BoundAttribute.BoundRuntimeInvisibleParameterAnnotationsAttribute, BoundAttribute.BoundRuntimeInvisibleTypeAnnotationsAttribute, BoundAttribute.BoundRuntimeVisibleAnnotationsAttribute, BoundAttribute.BoundRuntimeVisibleParameterAnnotationsAttribute, BoundAttribute.BoundRuntimeVisibleTypeAnnotationsAttribute, BoundAttribute.BoundSignatureAttribute, BoundAttribute.BoundSourceDebugExtensionAttribute, BoundAttribute.BoundSourceFileAttribute, BoundAttribute.BoundSourceIDAttribute, BoundAttribute.BoundStackMapTableAttribute, BoundAttribute.BoundSyntheticAttribute, BoundAttribute.BoundUnknownAttribute -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final intprotected final intprotected final intprotected final MethodModelprotected final intprotected final int -
Constructor Summary
ConstructorsConstructorDescriptionBoundCodeAttribute(AttributedElement enclosing, ClassReader reader, AttributeMapper<CodeAttribute> mapper, int payloadStart) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the bytes (bytecode) of the code array.intReturns The length of the code array in bytes.intReturns the maximum size of the local variable table.intmaxStack()Returns the maximum size of the operand stack.Methods inherited from class org.glavo.classfile.impl.BoundAttribute
attributeMapper, attributeName, constantPool, contents, payloadLen, readAttributes, toString, writeTo, writeTo, writeTo, writeTo, writeToMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.glavo.classfile.Attribute
attributeMapper, attributeNameMethods inherited from interface org.glavo.classfile.AttributedElement
attributes, findAttribute, findAttributesMethods inherited from interface org.glavo.classfile.attribute.CodeAttribute
labelToBciMethods inherited from interface org.glavo.classfile.CodeModel
exceptionHandlers, parentMethods inherited from interface org.glavo.classfile.CompoundElement
elementList, elements, elementStream, forEachElement, iteratorMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.glavo.classfile.WritableElement
writeTo
-
Field Details
-
codeStart
protected final int codeStart -
codeLength
protected final int codeLength -
codeEnd
protected final int codeEnd -
attributePos
protected final int attributePos -
exceptionHandlerPos
protected final int exceptionHandlerPos -
exceptionHandlerCnt
protected final int exceptionHandlerCnt -
enclosingMethod
-
-
Constructor Details
-
BoundCodeAttribute
public BoundCodeAttribute(AttributedElement enclosing, ClassReader reader, AttributeMapper<CodeAttribute> mapper, int payloadStart)
-
-
Method Details
-
maxStack
public int maxStack()Description copied from interface:CodeModelReturns the maximum size of the operand stack. -
maxLocals
public int maxLocals()Description copied from interface:CodeModelReturns the maximum size of the local variable table. -
codeLength
public int codeLength()Description copied from interface:CodeAttributeReturns The length of the code array in bytes.- Specified by:
codeLengthin interfaceCodeAttribute- Returns:
- The length of the code array in bytes
-
codeArray
public byte[] codeArray()Description copied from interface:CodeAttributeReturns the bytes (bytecode) of the code array.- Specified by:
codeArrayin interfaceCodeAttribute- Returns:
- the bytes (bytecode) of the code array
-