Top Description Fields Constructors Methods
org.apache.commons.compress.harmony.pack200

public Class Pack200ClassReader

extends ClassReader
Class Inheritance
Imports
org.objectweb.asm.ClassReader

Wrapper for ClassReader that enables pack200 to obtain extra class file information

Field Summary

Modifier and TypeField and Description
private boolean
private String
private boolean
private int
Inherited from org.objectweb.asm.ClassReader:
bEXPAND_FRAMESheaderSKIP_CODESKIP_DEBUGSKIP_FRAMES

Constructor Summary

AccessConstructor and Description
public
Pack200ClassReader(final byte[]
the contents of class file in the format of bytes
b
)

Method Summary

Modifier and TypeMethod and Description
public String
public boolean
public boolean
public Object
readConst(final int
the index of a CONSTANT_Integer, CONSTANT_Float, CONSTANT_Long, CONSTANT_Double, CONSTANT_Class, CONSTANT_String, CONSTANT_MethodType, CONSTANT_MethodHandle or CONSTANT_Dynamic entry in the class's constant pool.
item
,
final char[]
the buffer to be used to read strings. This buffer must be sufficiently large. It is not automatically resized.
buf
)

Overrides org.objectweb.asm.ClassReader.readConst.

Reads a numeric or string constant pool entry in this ClassReader.
public int
readUnsignedShort(final int
the start index of the value to be read in this ClassReader.
index
)

Overrides org.objectweb.asm.ClassReader.readUnsignedShort.

Reads an unsigned short value in this ClassReader.
public String
readUTF8(final int
the start offset of an unsigned short value in this ClassReader, whose value is the index of a CONSTANT_Utf8 entry in the class's constant pool table.
arg0
,
final char[]
the buffer to be used to read the string. This buffer must be sufficiently large. It is not automatically resized.
arg1
)

Overrides org.objectweb.asm.ClassReader.readUTF8.

Reads a CONSTANT_Utf8 constant pool entry in this ClassReader.
public void
setFileName(final String name)

Inherited from org.objectweb.asm.ClassReader:
acceptacceptgetAccessgetClassNamegetInterfacesgetItemgetItemCountgetMaxStringLengthgetSuperNamereadBytereadBytecodeInstructionOffsetreadClassreadIntreadLabelreadLongreadModulereadPackagereadShort

Field Detail

anySyntheticAttributesback to summary
private boolean anySyntheticAttributes
fileNameback to summary
private String fileName
lastConstantHadWideIndexback to summary
private boolean lastConstantHadWideIndex
lastUnsignedShortback to summary
private int lastUnsignedShort

Constructor Detail

Pack200ClassReaderback to summary
public Pack200ClassReader(final byte[] b)
Parameters
b:byte[]

the contents of class file in the format of bytes

Method Detail

getFileNameback to summary
public String getFileName()
hasSyntheticAttributesback to summary
public boolean hasSyntheticAttributes()
lastConstantHadWideIndexback to summary
public boolean lastConstantHadWideIndex()
readConstback to summary
public Object readConst(final int item, final char[] buf)

Overrides org.objectweb.asm.ClassReader.readConst.

Doc from org.objectweb.asm.ClassReader.readConst.

Reads a numeric or string constant pool entry in this ClassReader. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.

Parameters
item:int

the index of a CONSTANT_Integer, CONSTANT_Float, CONSTANT_Long, CONSTANT_Double, CONSTANT_Class, CONSTANT_String, CONSTANT_MethodType, CONSTANT_MethodHandle or CONSTANT_Dynamic entry in the class's constant pool.

buf:char[]

the buffer to be used to read strings. This buffer must be sufficiently large. It is not automatically resized.

Returns:Object

the Integer, Float, Long, Double, String, Type, Handle or ConstantDynamic corresponding to the specified constant pool entry.

Annotations
@Override
readUnsignedShortback to summary
public int readUnsignedShort(final int index)

Overrides org.objectweb.asm.ClassReader.readUnsignedShort.

Doc from org.objectweb.asm.ClassReader.readUnsignedShort.

Reads an unsigned short value in this ClassReader. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.

Parameters
index:int

the start index of the value to be read in this ClassReader.

Returns:int

the read value.

Annotations
@Override
readUTF8back to summary
public String readUTF8(final int arg0, final char[] arg1)

Overrides org.objectweb.asm.ClassReader.readUTF8.

Doc from org.objectweb.asm.ClassReader.readUTF8.

Reads a CONSTANT_Utf8 constant pool entry in this ClassReader. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.

Parameters
arg0:int

the start offset of an unsigned short value in this ClassReader, whose value is the index of a CONSTANT_Utf8 entry in the class's constant pool table.

arg1:char[]

the buffer to be used to read the string. This buffer must be sufficiently large. It is not automatically resized.

Returns:String

the String corresponding to the specified CONSTANT_Utf8 entry.

Annotations
@Override
setFileNameback to summary
public void setFileName(final String name)