Puts the given public API frame element type in #stackMapTableEntries , using the JVMS verification_type_info format used in StackMapTable attributes. @param type a frame element type described using the same format as in MethodVisitor#visitFrame, i.e. either Opcodes#TOP
(final Object type)
| 1960 | * a NEW instruction (for uninitialized types). |
| 1961 | */ |
| 1962 | private void putFrameType(final Object type) { |
| 1963 | if (type instanceof Integer) { |
| 1964 | stackMapTableEntries.putByte(((Integer) type).intValue()); |
| 1965 | } else if (type instanceof String) { |
| 1966 | stackMapTableEntries |
| 1967 | .putByte(Frame.ITEM_OBJECT) |
| 1968 | .putShort(symbolTable.addConstantClass((String) type).index); |
| 1969 | } else { |
| 1970 | stackMapTableEntries |
| 1971 | .putByte(Frame.ITEM_UNINITIALIZED) |
| 1972 | .putShort(((Label) type).bytecodeOffset); |
| 1973 | } |
| 1974 | } |
| 1975 | |
| 1976 | // ----------------------------------------------------------------------------------------------- |
| 1977 | // Utility methods |
no test coverage detected