Class NewAttributeBands
- java.lang.Object
-
- org.apache.commons.compress.harmony.unpack200.BandSet
-
- org.apache.commons.compress.harmony.unpack200.NewAttributeBands
-
public class NewAttributeBands extends BandSet
Set of bands relating to a non-predefined attribute
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
NewAttributeBands.Call
static class
NewAttributeBands.Callable
class
NewAttributeBands.Integral
class
NewAttributeBands.Reference
Constant Pool Referenceclass
NewAttributeBands.Replication
A replication is an array of layout elements, with an associated countclass
NewAttributeBands.Union
A Union is a type of layout element where the tag value acts as a selector for one of the union casesclass
NewAttributeBands.UnionCase
A Union case
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List
attributeLayoutElements
-
Constructor Summary
Constructors Constructor Description NewAttributeBands(Segment segment, AttributeLayout attributeLayout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBackwardsCallCount()
BHSDCodec
getCodec(java.lang.String layoutElement)
Returns theBHSDCodec
that should be used for the given layout element.java.util.List
parseAttributes(java.io.InputStream in, int occurrenceCount)
Parse the bands relating to this AttributeLayout and return the correct class file attributes as a List ofAttribute
.void
read(java.io.InputStream in)
void
setBackwardsCalls(int[] 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.void
unpack()
-
Methods inherited from class org.apache.commons.compress.harmony.unpack200.BandSet
decodeBandInt, decodeBandInt, getReferences, getReferences, parseCPClassReferences, parseCPDescriptorReferences, parseCPDoubleReferences, parseCPFieldRefReferences, parseCPFloatReferences, parseCPInterfaceMethodRefReferences, parseCPIntReferences, parseCPLongReferences, parseCPMethodRefReferences, parseCPSignatureReferences, parseCPSignatureReferences, parseCPStringReferences, parseCPUTF8References, parseCPUTF8References, parseFlags, parseFlags, parseFlags, parseFlags, parseReferences, parseReferences, unpack
-
-
-
-
Field Detail
-
attributeLayoutElements
protected java.util.List attributeLayoutElements
-
-
Constructor Detail
-
NewAttributeBands
public NewAttributeBands(Segment segment, AttributeLayout attributeLayout) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
read
public void read(java.io.InputStream in) throws java.io.IOException, Pack200Exception
- Specified by:
read
in classBandSet
- Throws:
java.io.IOException
Pack200Exception
-
parseAttributes
public java.util.List parseAttributes(java.io.InputStream in, int occurrenceCount) throws java.io.IOException, Pack200Exception
Parse the bands relating to this AttributeLayout and return the correct class file attributes as a List ofAttribute
.- Parameters:
in
- parse source.occurrenceCount
- TODO- Returns:
- Class file attributes as a List of
Attribute
. - Throws:
java.io.IOException
- If an I/O error occurs.Pack200Exception
- TODO
-
getCodec
public BHSDCodec getCodec(java.lang.String layoutElement)
Returns theBHSDCodec
that should be used for the given layout element.- Parameters:
layoutElement
- TODO- Returns:
- the
BHSDCodec
that should be used for the given layout element.
-
getBackwardsCallCount
public int getBackwardsCallCount()
-
setBackwardsCalls
public void setBackwardsCalls(int[] backwardsCalls) throws java.io.IOException
Once the attribute bands have been read the callables can be informed about the number of times each is subject to a backwards call. This method is used to set this information.- Parameters:
backwardsCalls
- one int for each backwards callable, which contains the number of times that callable is subject to a backwards call.- Throws:
java.io.IOException
- If an I/O error occurs.
-
unpack
public void unpack() throws java.io.IOException, Pack200Exception
- Specified by:
unpack
in classBandSet
- Throws:
java.io.IOException
Pack200Exception
-
-