Top Description Inners Fields Constructors Methods
org.apache.commons.compress.harmony.unpack200.bytecode

public Class NewAttribute

extends BCIRenumberedAttribute
Class Inheritance
Imports
java.io.DataOutputStream, .IOException, java.util.ArrayList, .List

A compressor-defined class file attribute.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private final List<Object>
private final int
private final List<Integer>
private ClassConstantPool
Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute:
renumbered

Constructor Summary

AccessConstructor and Description
public
NewAttribute(final CPUTF8 attributeName, final int layoutIndex)

Method Summary

Modifier and TypeMethod and Description
public void
addBCIndex(final int length, final int value)

public void
addBCLength(final int length, final int value)

public void
addBCOffset(final int length, final int value)

public void
addInteger(final int length, final long value)

public void
addToBody(final int length, final Object value)

public int
protected int
protected ClassFileEntry[]
protected int[]
public void
renumber(final List<Integer>
List of Integer offsets of the byte code array
byteCodeOffsets
)

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.renumber.

In Pack200, line number tables are BCI renumbered.
protected void
resolve(final ClassConstantPool
TODO
pool
)

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.Attribute.resolve.

Allows the constant pool entries to resolve their nested entries.
public String
toString()

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.toString.

Returns a string representation of the object.
protected void
Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute:
hasBCIRenumbering

Field Detail

bodyback to summary
private final List<Object> body
layoutIndexback to summary
private final int layoutIndex
lengthsback to summary
private final List<Integer> lengths
poolback to summary
private ClassConstantPool pool

Constructor Detail

NewAttributeback to summary
public NewAttribute(final CPUTF8 attributeName, final int layoutIndex)

Method Detail

addBCIndexback to summary
public void addBCIndex(final int length, final int value)
addBCLengthback to summary
public void addBCLength(final int length, final int value)
addBCOffsetback to summary
public void addBCOffset(final int length, final int value)
addIntegerback to summary
public void addInteger(final int length, final long value)
addToBodyback to summary
public void addToBody(final int length, final Object value)
getLayoutIndexback to summary
public int getLayoutIndex()
getLengthback to summary
protected int getLength()

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.getLength.

Annotations
@Override
getNestedClassFileEntriesback to summary
protected ClassFileEntry[] getNestedClassFileEntries()

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.Attribute.getNestedClassFileEntries.

Annotations
@Override
getStartPCsback to summary
protected int[] getStartPCs()

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.getStartPCs.

Annotations
@Override
renumberback to summary
public void renumber(final List<Integer> byteCodeOffsets)

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.renumber.

Doc from org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.renumber.

In Pack200, line number tables are BCI renumbered. This method takes the byteCodeOffsets (which is a List of Integers specifying the offset in the byte code array of each instruction) and updates the start_pcs so that it points to the instruction index itself, not the BCI renumbering of the instruction.

Parameters
byteCodeOffsets:List<Integer>

List of Integer offsets of the byte code array

Annotations
@Override
resolveback to summary
protected void resolve(final ClassConstantPool pool)

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.Attribute.resolve.

Doc from org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry.resolve.

Allows the constant pool entries to resolve their nested entries.

Parameters
pool:ClassConstantPool

TODO

Annotations
@Override
toStringback to summary
public String toString()

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
writeBodyback to summary
protected void writeBody(final DataOutputStream dos) throws IOException

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.writeBody.

Annotations
@Override
org.apache.commons.compress.harmony.unpack200.bytecode back to summary

private abstract Class NewAttribute.AbstractBcValue

extends Object
Class Inheritance
  • java.lang.Object
  • org.apache.commons.compress.harmony.unpack200.bytecode.NewAttribute.AbstractBcValue
Known Direct Subclasses
org.apache.commons.compress.harmony.unpack200.bytecode.NewAttribute.BCIndex, org.apache.commons.compress.harmony.unpack200.bytecode.NewAttribute.BCLength, org.apache.commons.compress.harmony.unpack200.bytecode.NewAttribute.BCOffset

Field Summary

Modifier and TypeField and Description
pack-priv int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
setActualValue(final int value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

actualValueback to summary
pack-priv int actualValue

Constructor Detail

AbstractBcValueback to summary
private AbstractBcValue()

Method Detail

setActualValueback to summary
public void setActualValue(final int value)
org.apache.commons.compress.harmony.unpack200.bytecode back to summary

private final Class NewAttribute.BCIndex

extends AbstractBcValue
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.NewAttribute.AbstractBcValue:
actualValue

Constructor Summary

AccessConstructor and Description
pack-priv
BCIndex(final int index)

Method Summary

Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.NewAttribute.AbstractBcValue:
setActualValue

Field Detail

indexback to summary
private final int index

Constructor Detail

BCIndexback to summary
pack-priv BCIndex(final int index)
org.apache.commons.compress.harmony.unpack200.bytecode back to summary

private final Class NewAttribute.BCLength

extends AbstractBcValue
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.NewAttribute.AbstractBcValue:
actualValue

Constructor Summary

AccessConstructor and Description
pack-priv
BCLength(final int length)

Method Summary

Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.NewAttribute.AbstractBcValue:
setActualValue

Field Detail

lengthback to summary
private final int length

Constructor Detail

BCLengthback to summary
pack-priv BCLength(final int length)
org.apache.commons.compress.harmony.unpack200.bytecode back to summary

private final Class NewAttribute.BCOffset

extends AbstractBcValue
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
private final int
Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.NewAttribute.AbstractBcValue:
actualValue

Constructor Summary

AccessConstructor and Description
pack-priv
BCOffset(final int offset)

Method Summary

Modifier and TypeMethod and Description
public void
setIndex(final int index)

Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.NewAttribute.AbstractBcValue:
setActualValue

Field Detail

indexback to summary
private int index
offsetback to summary
private final int offset

Constructor Detail

BCOffsetback to summary
pack-priv BCOffset(final int offset)

Method Detail

setIndexback to summary
public void setIndex(final int index)