|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.jcr.AttributeInfo scale.jcr.CodeAttribute
public class CodeAttribute
This class is used to both represent a Java class file code attribute structure and to read that class file code attribute structure.
$Id: CodeAttribute.java,v 1.14 2007-10-04 19:58:15 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Field Summary | |
---|---|
static int |
AALOAD
|
static int |
AASTORE
|
static int |
ACONST_NULL
|
static int |
ALOAD
|
static int |
ALOAD_0
|
static int |
ALOAD_1
|
static int |
ALOAD_2
|
static int |
ALOAD_3
|
static int |
ANEWARRAY
|
static int |
ARETURN
|
static int |
ARRAYLENGTH
|
static int |
ASTORE
|
static int |
ASTORE_0
|
static int |
ASTORE_1
|
static int |
ASTORE_2
|
static int |
ASTORE_3
|
static int |
ATHROW
|
static int |
BALOAD
|
static int |
BASTORE
|
static int |
BIPUSH
|
static int |
CALOAD
|
static int |
CASTORE
|
static int |
CHECKCAST
|
static int |
D2F
|
static int |
D2I
|
static int |
D2L
|
static int |
DADD
|
static int |
DALOAD
|
static int |
DASTORE
|
static int |
DCMPG
|
static int |
DCMPL
|
static int |
DCONST_0
|
static int |
DCONST_1
|
static int |
DDIV
|
static int |
DLOAD
|
static int |
DLOAD_0
|
static int |
DLOAD_1
|
static int |
DLOAD_2
|
static int |
DLOAD_3
|
static int |
DMUL
|
static int |
DNEG
|
static int |
DREM
|
static int |
DRETURN
|
static int |
DSTORE
|
static int |
DSTORE_0
|
static int |
DSTORE_1
|
static int |
DSTORE_2
|
static int |
DSTORE_3
|
static int |
DSUB
|
static int |
DUP
|
static int |
DUP_X1
|
static int |
DUP_X2
|
static int |
DUP2
|
static int |
DUP2_X1
|
static int |
DUP2_X2
|
static int |
F2D
|
static int |
F2I
|
static int |
F2L
|
static int |
FADD
|
static int |
FALOAD
|
static int |
FASTORE
|
static int |
FCMPG
|
static int |
FCMPL
|
static int |
FCONST_0
|
static int |
FCONST_1
|
static int |
FCONST_2
|
static int |
FDIV
|
static int |
FLOAD
|
static int |
FLOAD_0
|
static int |
FLOAD_1
|
static int |
FLOAD_2
|
static int |
FLOAD_3
|
static int |
FMUL
|
static int |
FNEG
|
static int |
FREM
|
static int |
FRETURN
|
static int |
FSTORE
|
static int |
FSTORE_0
|
static int |
FSTORE_1
|
static int |
FSTORE_2
|
static int |
FSTORE_3
|
static int |
FSUB
|
static int |
GETFIELD
|
static int |
GETSTATIC
|
static int |
GOTO
|
static int |
GOTO_W
|
static int |
I2B
|
static int |
I2C
|
static int |
I2D
|
static int |
I2F
|
static int |
I2L
|
static int |
I2S
|
static int |
IADD
|
static int |
IALOAD
|
static int |
IAND
|
static int |
IASTORE
|
static int |
ICONST_0
|
static int |
ICONST_1
|
static int |
ICONST_2
|
static int |
ICONST_3
|
static int |
ICONST_4
|
static int |
ICONST_5
|
static int |
ICONST_M1
|
static int |
IDIV
|
static int |
IF_ACMPEQ
|
static int |
IF_ACMPNE
|
static int |
IF_ICMPEQ
|
static int |
IF_ICMPGE
|
static int |
IF_ICMPGT
|
static int |
IF_ICMPLE
|
static int |
IF_ICMPLT
|
static int |
IF_ICMPNE
|
static int |
IFEQ
|
static int |
IFGE
|
static int |
IFGT
|
static int |
IFLE
|
static int |
IFLT
|
static int |
IFNE
|
static int |
IFNONNULL
|
static int |
IFNULL
|
static int |
IINC
|
static int |
ILOAD
|
static int |
ILOAD_0
|
static int |
ILOAD_1
|
static int |
ILOAD_2
|
static int |
ILOAD_3
|
static int |
IMUL
|
static int |
INEG
|
static int |
INSTANCEOF
|
static int |
INVOKEINTERFACE
|
static int |
INVOKESPECIAL
|
static int |
INVOKESTATIC
|
static int |
INVOKEVIRTUAL
|
static int |
IOR
|
static int |
IREM
|
static int |
IRETURN
|
static int |
ISHL
|
static int |
ISHR
|
static boolean[] |
isInteger
Is the type an integer type? |
static int |
ISTORE
|
static int |
ISTORE_0
|
static int |
ISTORE_1
|
static int |
ISTORE_2
|
static int |
ISTORE_3
|
static boolean[] |
isTwo
Does the type take two words? |
static int |
ISUB
|
static int |
IUSHR
|
static int |
IXOR
|
static int |
JSR
|
static int |
JSR_W
|
static int |
L2D
|
static int |
L2F
|
static int |
L2I
|
static int |
LADD
|
static int |
LALOAD
|
static int |
LAND
|
static int |
LASTORE
|
static int |
LCMP
|
static int |
LCONST_0
|
static int |
LCONST_1
|
static int |
LDC
|
static int |
LDC_W
|
static int |
LDC2_W
|
static int |
LDIV
|
static int |
LLOAD
|
static int |
LLOAD_0
|
static int |
LLOAD_1
|
static int |
LLOAD_2
|
static int |
LLOAD_3
|
static int |
LMUL
|
static int |
LNEG
|
static int |
LOOKUPSWITCH
|
static int |
LOR
|
static int |
LREM
|
static int |
LRETURN
|
static int |
LSHL
|
static int |
LSHR
|
static int |
LSTORE
|
static int |
LSTORE_0
|
static int |
LSTORE_1
|
static int |
LSTORE_2
|
static int |
LSTORE_3
|
static int |
LSUB
|
static int |
LUSHR
|
static int |
LXOR
|
static int |
MONITORENTER
|
static int |
MONITOREXIT
|
static int |
MULTIANEWARRAY
|
static int |
NEW
|
static int |
NEWARRAY
|
static int |
NOP
The Java byte codes. |
static java.lang.String[] |
opcodeName
Indexed by an opcode to obtain the name of the opcode for debugging. |
static byte[] |
opcodeSize
Indexed by an opcode to obtain the instruction length. |
static int |
POP
|
static int |
POP2
|
static int |
PUTFIELD
|
static int |
PUTSTATIC
|
static int |
RET
|
static int |
RETURN
|
static int |
SALOAD
|
static int |
SASTORE
|
static int |
SIPUSH
|
static int |
SWAP
|
static byte |
T_ADDRESS
Types from the NEWARRAY byte code. |
static byte |
T_BOOLEAN
|
static byte |
T_BYTE
|
static byte |
T_CHAR
|
static byte |
T_DOUBLE
|
static byte |
T_FLOAT
|
static byte |
T_INT
|
static byte |
T_LONG
|
static byte |
T_SHORT
|
static int |
TABLESWITCH
|
static char[] |
typeSpecifier
Convert from Java type number to Java type specifier. |
static int |
UNDEF186
|
static int |
UNDEF202
|
static int |
UNDEF203
|
static int |
UNDEF204
|
static int |
UNDEF205
|
static int |
UNDEF206
|
static int |
UNDEF207
|
static int |
UNDEF208
|
static int |
UNDEF209
|
static int |
UNDEF210
|
static int |
UNDEF211
|
static int |
UNDEF212
|
static int |
UNDEF213
|
static int |
UNDEF214
|
static int |
UNDEF215
|
static int |
UNDEF216
|
static int |
UNDEF217
|
static int |
UNDEF218
|
static int |
UNDEF219
|
static int |
UNDEF220
|
static int |
UNDEF221
|
static int |
UNDEF222
|
static int |
UNDEF223
|
static int |
UNDEF224
|
static int |
UNDEF225
|
static int |
UNDEF226
|
static int |
UNDEF227
|
static int |
UNDEF228
|
static int |
UNDEF229
|
static int |
UNDEF230
|
static int |
UNDEF231
|
static int |
UNDEF232
|
static int |
UNDEF233
|
static int |
UNDEF234
|
static int |
UNDEF235
|
static int |
UNDEF236
|
static int |
UNDEF237
|
static int |
UNDEF238
|
static int |
UNDEF239
|
static int |
UNDEF240
|
static int |
UNDEF241
|
static int |
UNDEF242
|
static int |
UNDEF243
|
static int |
UNDEF244
|
static int |
UNDEF245
|
static int |
UNDEF246
|
static int |
UNDEF247
|
static int |
UNDEF248
|
static int |
UNDEF249
|
static int |
UNDEF250
|
static int |
UNDEF251
|
static int |
UNDEF252
|
static int |
UNDEF253
|
static int |
UNDEF254
|
static int |
UNDEF255
|
static int |
WIDE
|
Constructor Summary | |
---|---|
CodeAttribute(int nameIndex,
int maxStack,
int maxLocals,
byte[] code,
ExceptionEntry[] exceptionTable,
AttributeInfo[] attributes)
|
Method Summary | |
---|---|
AttributeInfo[] |
getAttributes()
|
int |
getAttributesCount()
|
int |
getByte(int index)
|
int |
getByte2(int index)
|
int |
getCodelength()
|
ExceptionEntry[] |
getExceptionTable()
|
int |
getExceptionTableLength()
|
int |
getIndex(int index)
|
int |
getIndex2(int index)
|
int |
getIndex4(int index)
|
int |
getMaxLocals()
|
int |
getMaxStack()
|
int |
getOpcode(int index)
|
int |
getOpcodeLength(int index)
|
boolean |
isBasicBlock(int index)
|
static CodeAttribute |
read(ClassFile cf,
java.io.DataInputStream reader,
int nameIndex)
Read in the CodeAttribute structure. |
Methods inherited from class scale.jcr.AttributeInfo |
---|
getNameIndex, read |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NOP
public static final int ACONST_NULL
public static final int ICONST_M1
public static final int ICONST_0
public static final int ICONST_1
public static final int ICONST_2
public static final int ICONST_3
public static final int ICONST_4
public static final int ICONST_5
public static final int LCONST_0
public static final int LCONST_1
public static final int FCONST_0
public static final int FCONST_1
public static final int FCONST_2
public static final int DCONST_0
public static final int DCONST_1
public static final int BIPUSH
public static final int SIPUSH
public static final int LDC
public static final int LDC_W
public static final int LDC2_W
public static final int ILOAD
public static final int LLOAD
public static final int FLOAD
public static final int DLOAD
public static final int ALOAD
public static final int ILOAD_0
public static final int ILOAD_1
public static final int ILOAD_2
public static final int ILOAD_3
public static final int LLOAD_0
public static final int LLOAD_1
public static final int LLOAD_2
public static final int LLOAD_3
public static final int FLOAD_0
public static final int FLOAD_1
public static final int FLOAD_2
public static final int FLOAD_3
public static final int DLOAD_0
public static final int DLOAD_1
public static final int DLOAD_2
public static final int DLOAD_3
public static final int ALOAD_0
public static final int ALOAD_1
public static final int ALOAD_2
public static final int ALOAD_3
public static final int IALOAD
public static final int LALOAD
public static final int FALOAD
public static final int DALOAD
public static final int AALOAD
public static final int BALOAD
public static final int CALOAD
public static final int SALOAD
public static final int ISTORE
public static final int LSTORE
public static final int FSTORE
public static final int DSTORE
public static final int ASTORE
public static final int ISTORE_0
public static final int ISTORE_1
public static final int ISTORE_2
public static final int ISTORE_3
public static final int LSTORE_0
public static final int LSTORE_1
public static final int LSTORE_2
public static final int LSTORE_3
public static final int FSTORE_0
public static final int FSTORE_1
public static final int FSTORE_2
public static final int FSTORE_3
public static final int DSTORE_0
public static final int DSTORE_1
public static final int DSTORE_2
public static final int DSTORE_3
public static final int ASTORE_0
public static final int ASTORE_1
public static final int ASTORE_2
public static final int ASTORE_3
public static final int IASTORE
public static final int LASTORE
public static final int FASTORE
public static final int DASTORE
public static final int AASTORE
public static final int BASTORE
public static final int CASTORE
public static final int SASTORE
public static final int POP
public static final int POP2
public static final int DUP
public static final int DUP_X1
public static final int DUP_X2
public static final int DUP2
public static final int DUP2_X1
public static final int DUP2_X2
public static final int SWAP
public static final int IADD
public static final int LADD
public static final int FADD
public static final int DADD
public static final int ISUB
public static final int LSUB
public static final int FSUB
public static final int DSUB
public static final int IMUL
public static final int LMUL
public static final int FMUL
public static final int DMUL
public static final int IDIV
public static final int LDIV
public static final int FDIV
public static final int DDIV
public static final int IREM
public static final int LREM
public static final int FREM
public static final int DREM
public static final int INEG
public static final int LNEG
public static final int FNEG
public static final int DNEG
public static final int ISHL
public static final int LSHL
public static final int ISHR
public static final int LSHR
public static final int IUSHR
public static final int LUSHR
public static final int IAND
public static final int LAND
public static final int IOR
public static final int LOR
public static final int IXOR
public static final int LXOR
public static final int IINC
public static final int I2L
public static final int I2F
public static final int I2D
public static final int L2I
public static final int L2F
public static final int L2D
public static final int F2I
public static final int F2L
public static final int F2D
public static final int D2I
public static final int D2L
public static final int D2F
public static final int I2B
public static final int I2C
public static final int I2S
public static final int LCMP
public static final int FCMPL
public static final int FCMPG
public static final int DCMPL
public static final int DCMPG
public static final int IFEQ
public static final int IFNE
public static final int IFLT
public static final int IFGE
public static final int IFGT
public static final int IFLE
public static final int IF_ICMPEQ
public static final int IF_ICMPNE
public static final int IF_ICMPLT
public static final int IF_ICMPGE
public static final int IF_ICMPGT
public static final int IF_ICMPLE
public static final int IF_ACMPEQ
public static final int IF_ACMPNE
public static final int GOTO
public static final int JSR
public static final int RET
public static final int TABLESWITCH
public static final int LOOKUPSWITCH
public static final int IRETURN
public static final int LRETURN
public static final int FRETURN
public static final int DRETURN
public static final int ARETURN
public static final int RETURN
public static final int GETSTATIC
public static final int PUTSTATIC
public static final int GETFIELD
public static final int PUTFIELD
public static final int INVOKEVIRTUAL
public static final int INVOKESPECIAL
public static final int INVOKESTATIC
public static final int INVOKEINTERFACE
public static final int UNDEF186
public static final int NEW
public static final int NEWARRAY
public static final int ANEWARRAY
public static final int ARRAYLENGTH
public static final int ATHROW
public static final int CHECKCAST
public static final int INSTANCEOF
public static final int MONITORENTER
public static final int MONITOREXIT
public static final int WIDE
public static final int MULTIANEWARRAY
public static final int IFNULL
public static final int IFNONNULL
public static final int GOTO_W
public static final int JSR_W
public static final int UNDEF202
public static final int UNDEF203
public static final int UNDEF204
public static final int UNDEF205
public static final int UNDEF206
public static final int UNDEF207
public static final int UNDEF208
public static final int UNDEF209
public static final int UNDEF210
public static final int UNDEF211
public static final int UNDEF212
public static final int UNDEF213
public static final int UNDEF214
public static final int UNDEF215
public static final int UNDEF216
public static final int UNDEF217
public static final int UNDEF218
public static final int UNDEF219
public static final int UNDEF220
public static final int UNDEF221
public static final int UNDEF222
public static final int UNDEF223
public static final int UNDEF224
public static final int UNDEF225
public static final int UNDEF226
public static final int UNDEF227
public static final int UNDEF228
public static final int UNDEF229
public static final int UNDEF230
public static final int UNDEF231
public static final int UNDEF232
public static final int UNDEF233
public static final int UNDEF234
public static final int UNDEF235
public static final int UNDEF236
public static final int UNDEF237
public static final int UNDEF238
public static final int UNDEF239
public static final int UNDEF240
public static final int UNDEF241
public static final int UNDEF242
public static final int UNDEF243
public static final int UNDEF244
public static final int UNDEF245
public static final int UNDEF246
public static final int UNDEF247
public static final int UNDEF248
public static final int UNDEF249
public static final int UNDEF250
public static final int UNDEF251
public static final int UNDEF252
public static final int UNDEF253
public static final int UNDEF254
public static final int UNDEF255
public static final byte[] opcodeSize
public static final java.lang.String[] opcodeName
public static final byte T_ADDRESS
public static final byte T_BOOLEAN
public static final byte T_CHAR
public static final byte T_FLOAT
public static final byte T_DOUBLE
public static final byte T_BYTE
public static final byte T_SHORT
public static final byte T_INT
public static final byte T_LONG
public static final char[] typeSpecifier
public static final boolean[] isInteger
public static final boolean[] isTwo
Constructor Detail |
---|
public CodeAttribute(int nameIndex, int maxStack, int maxLocals, byte[] code, ExceptionEntry[] exceptionTable, AttributeInfo[] attributes)
Method Detail |
---|
public int getMaxStack()
public int getMaxLocals()
public int getCodelength()
public int getExceptionTableLength()
public ExceptionEntry[] getExceptionTable()
public int getAttributesCount()
public AttributeInfo[] getAttributes()
public int getOpcode(int index)
public int getOpcodeLength(int index)
index
- is the index of the opcode in the code
public boolean isBasicBlock(int index)
index
- into the code
public int getIndex(int index)
public int getIndex2(int index)
public int getIndex4(int index)
public int getByte(int index)
public int getByte2(int index)
public static CodeAttribute read(ClassFile cf, java.io.DataInputStream reader, int nameIndex) throws java.io.IOException
java.io.IOException
- if there is an IO problem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |