Contents | Prev | Next | Index

putfield

Operation
Set field in object

putfield
indexbyte1
indexbyte2

Forms
putfield = 181 (0xb5)

Stack
..., objectref, value ...

OR

Stack
..., objectref, value.word1, value.word2 ...

Description
The unsigned indexbyte1 and indexbyte2 are used to construct an index into the constant pool of the current class (§3.6), where the value of the index is (indexbyte1 << 8) | indexbyte2. The constant pool item at the index must be a CONSTANT_Fieldref (§4.4.2), a reference to a class name and a field name. If the field is protected (§4.6), then it must be either a member of the current class or a member of a superclass of the current class, and the class of objectref must be either the current class or a subclass of the current class.


Contents | Prev | Next | Index

Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com