Package kala.compress.harmony.unpack200
Class NewAttributeBands.Union
- java.lang.Object
-
- kala.compress.harmony.unpack200.NewAttributeBands.LayoutElement
-
- kala.compress.harmony.unpack200.NewAttributeBands.Union
-
- All Implemented Interfaces:
NewAttributeBands.AttributeLayoutElement
- Enclosing class:
- NewAttributeBands
public class NewAttributeBands.Union extends NewAttributeBands.LayoutElement
A Union is a type of layout element where the tag value acts as a selector for one of the union cases
-
-
Field Summary
Fields Modifier and Type Field Description private int[]caseCountsprivate java.util.List<NewAttributeBands.LayoutElement>defaultCaseBodyprivate intdefaultCountprivate java.util.List<NewAttributeBands.UnionCase>unionCasesprivate NewAttributeBands.IntegralunionTag
-
Constructor Summary
Constructors Constructor Description Union(java.lang.String tag, java.util.List<NewAttributeBands.UnionCase> unionCases, java.util.List<NewAttributeBands.LayoutElement> body)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToAttribute(int n, NewAttribute attribute)Adds the band data for this element at the given index to the attribute.java.util.List<NewAttributeBands.LayoutElement>getDefaultCaseBody()java.util.List<NewAttributeBands.UnionCase>getUnionCases()NewAttributeBands.IntegralgetUnionTag()voidreadBands(java.io.InputStream in, int count)Read the bands associated with this part of the layout.-
Methods inherited from class kala.compress.harmony.unpack200.NewAttributeBands.LayoutElement
getLength
-
-
-
-
Field Detail
-
unionTag
private final NewAttributeBands.Integral unionTag
-
unionCases
private final java.util.List<NewAttributeBands.UnionCase> unionCases
-
defaultCaseBody
private final java.util.List<NewAttributeBands.LayoutElement> defaultCaseBody
-
caseCounts
private int[] caseCounts
-
defaultCount
private int defaultCount
-
-
Constructor Detail
-
Union
public Union(java.lang.String tag, java.util.List<NewAttributeBands.UnionCase> unionCases, java.util.List<NewAttributeBands.LayoutElement> body)
-
-
Method Detail
-
addToAttribute
public void addToAttribute(int n, NewAttribute attribute)Description copied from interface:NewAttributeBands.AttributeLayoutElementAdds the band data for this element at the given index to the attribute.- Parameters:
n- Index position to add the attribute.attribute- The attribute to add.
-
getDefaultCaseBody
public java.util.List<NewAttributeBands.LayoutElement> getDefaultCaseBody()
-
getUnionCases
public java.util.List<NewAttributeBands.UnionCase> getUnionCases()
-
getUnionTag
public NewAttributeBands.Integral getUnionTag()
-
readBands
public void readBands(java.io.InputStream in, int count) throws java.io.IOException, Pack200ExceptionDescription copied from interface:NewAttributeBands.AttributeLayoutElementRead the bands associated with this part of the layout.- Parameters:
in- TODOcount- TODO- Throws:
Pack200Exception- Bad archive.java.io.IOException- If an I/O error occurs.
-
-