public abstract class AttributeReader
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
attr |
protected ClassReader |
cr |
protected int |
length |
| Modifier | Constructor and Description |
|---|---|
protected |
AttributeReader(ClassReader.AttrIterator attr,
java.lang.String expectedName)
Construct a reader for a particular attribute.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkSize(int offset,
int len)
Ensure that the len bytes starting at offset fall within the attribute data.
|
protected void |
checkSizeEquals(int offset,
int len)
Ensure that the len bytes starting at offset end at the end of the attribute data.
|
ClassReader |
getClassReader() |
int |
getRawOffset() |
int |
getRawSize() |
protected final ClassReader cr
protected final int attr
protected final int length
protected AttributeReader(ClassReader.AttrIterator attr, java.lang.String expectedName) throws InvalidClassFileException
attr - a valid attribute iterator pointing at the attribute to readexpectedName - the name the attribute must haveInvalidClassFileExceptionpublic final ClassReader getClassReader()
public final int getRawOffset()
public final int getRawSize()
protected final void checkSize(int offset,
int len)
throws InvalidClassFileException
InvalidClassFileException - if the bytes fall outside the dataprotected final void checkSizeEquals(int offset,
int len)
throws InvalidClassFileException
InvalidClassFileException - if the bytes do not end at the end of the attribute