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

public Class NewAttributeBands

extends BandSet
Class Inheritance
Imports
java.io.IOException, .InputStream, .StringReader, java.util.ArrayList, .Collections, .List, org.apache.commons.compress.harmony.pack200.BHSDCodec, .Codec, .Pack200Exception, org.apache.commons.compress.harmony.unpack200.bytecode.Attribute, .CPClass, .CPDouble, .CPFieldRef, .CPFloat, .CPInteger, .CPInterfaceMethodRef, .CPLong, .CPMethodRef, .CPNameAndType, .CPString, .CPUTF8, .NewAttribute, org.apache.commons.compress.utils.ParsingUtils

Sets of bands relating to a non-predefined attribute

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static interface
NewAttributeBands.AttributeLayoutElement

An AttributeLayoutElement is a part of an attribute layout and has one or more bands associated with it, which transmit the AttributeElement data for successive Attributes of this type.

public class
public static class
public class
private abstract static class
public class
NewAttributeBands.Reference

Constant Pool Reference

public class
NewAttributeBands.Replication

A replication is an array of layout elements, with an associated count

public class
NewAttributeBands.Union

A Union is a type of layout element where the tag value acts as a selector for one of the union cases

public class

Field Summary

Modifier and TypeField and Description
private final AttributeLayout
protected List<NewAttributeBands.AttributeLayoutElement>
private int
Inherited from org.apache.commons.compress.harmony.unpack200.BandSet:
headersegment

Constructor Summary

AccessConstructor and Description
public
NewAttributeBands(final Segment segment, final AttributeLayout attributeLayout)

Method Summary

Modifier and TypeMethod and Description
public int
public BHSDCodec

Returns:

the BHSDCodec that should be used for the given layout element.
getCodec
(final String
TODO
layoutElement
)

Returns the BHSDCodec that should be used for the given layout element.

private Attribute

Returns:

attribute at the given index.
getOneAttribute
(final int
TODO
index
,
final List<NewAttributeBands.AttributeLayoutElement>
TODO
elements
)

Gets one attribute at the given index from the various bands.

private StringReader
getStreamUpToMatchingBracket(final StringReader stream)

Utility method to get the contents of the given stream, up to the next ], (ignoring pairs of brackets [ and ])

public List<Attribute>

Returns:

Class file attributes as a List of Attribute.
parseAttributes
(final InputStream
parse source.
in
,
final int
TODO
occurrenceCount
)

Parse the bands relating to this AttributeLayout and return the correct class file attributes as a List of Attribute.

private void
parseLayout()

Tokenize the layout into AttributeElements

public void
private List<NewAttributeBands.LayoutElement>

Returns:

List of LayoutElements
readBody
(final StringReader stream)

Read a 'body' section of the layout from the given stream

private NewAttributeBands.AttributeLayoutElement
private NewAttributeBands.LayoutElement
private NewAttributeBands.UnionCase

Returns:

A UnionCase from the stream.
readNextUnionCase
(final StringReader
source stream.
stream
)

Read a UnionCase from the stream.

private Integer
readNumber(final StringReader stream)

Read a number from the stream and return it

private String

Returns:

the contents of the given stream.
readUpToMatchingBracket
(final StringReader
input stream.
stream
)

Gets the contents of the given stream, up to the next ], (ignoring pairs of brackets [ and ])

private void
resolveCalls()

Resolve calls in the attribute layout and returns the number of backwards calls

private int
resolveCallsForElement(final int i, final NewAttributeBands.Callable currentCallable, final NewAttributeBands.LayoutElement layoutElement)

public void
setBackwardsCalls(final int[]
one int for each backwards callable, which contains the number of times that callable is subject to a backwards call.
backwardsCalls
)

Once the attribute bands have been read the callables can be informed about the number of times each is subject to a backwards call.

public void
Inherited from org.apache.commons.compress.harmony.unpack200.BandSet:
decodeBandIntdecodeBandIntgetReferencesgetReferencesparseCPClassReferencesparseCPDescriptorReferencesparseCPDoubleReferencesparseCPFieldRefReferencesparseCPFloatReferencesparseCPInterfaceMethodRefReferencesparseCPIntReferencesparseCPLongReferencesparseCPMethodRefReferencesparseCPSignatureReferencesparseCPSignatureReferencesparseCPStringReferencesparseCPUTF8ReferencesparseCPUTF8ReferencesparseFlagsparseFlagsparseFlagsparseFlagsparseReferencesparseReferencesunpack