Package kala.compress.harmony.unpack200
Class AttributeLayoutMap
- java.lang.Object
-
- kala.compress.harmony.unpack200.AttributeLayoutMap
-
public class AttributeLayoutMap extends java.lang.ObjectStores a mapping from attribute names to their corresponding layout types. Note that names of attribute layouts and their formats are not internationalized, and should not be translated.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.Integer,AttributeLayout>classLayoutsprivate java.util.Map<java.lang.Integer,AttributeLayout>codeLayoutsprivate java.util.Map<java.lang.Integer,AttributeLayout>fieldLayoutsprivate java.util.Map<java.lang.Integer,AttributeLayout>[]layoutsThe order of the maps in this array should not be changed as their indices correspond to the value of their context constants (AttributeLayout.CONTEXT_CLASS etc.)private java.util.Map<AttributeLayout,NewAttributeBands>layoutsToBandsprivate java.util.Map<java.lang.Integer,AttributeLayout>methodLayouts
-
Constructor Summary
Constructors Constructor Description AttributeLayoutMap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(AttributeLayout layout)voidadd(AttributeLayout layout, NewAttributeBands newBands)voidcheckMap()The map should not contain the same layout and name combination more than once for each context.NewAttributeBandsgetAttributeBands(AttributeLayout layout)AttributeLayoutgetAttributeLayout(int index, int context)AttributeLayoutgetAttributeLayout(java.lang.String name, int context)private static AttributeLayout[]getDefaultAttributeLayouts()private java.util.Map<java.lang.Integer,AttributeLayout>getLayout(int context)
-
-
-
Field Detail
-
classLayouts
private final java.util.Map<java.lang.Integer,AttributeLayout> classLayouts
-
fieldLayouts
private final java.util.Map<java.lang.Integer,AttributeLayout> fieldLayouts
-
methodLayouts
private final java.util.Map<java.lang.Integer,AttributeLayout> methodLayouts
-
codeLayouts
private final java.util.Map<java.lang.Integer,AttributeLayout> codeLayouts
-
layouts
private final java.util.Map<java.lang.Integer,AttributeLayout>[] layouts
The order of the maps in this array should not be changed as their indices correspond to the value of their context constants (AttributeLayout.CONTEXT_CLASS etc.)All elements are of type
Map<Integer, AttributeLayout>.
-
layoutsToBands
private final java.util.Map<AttributeLayout,NewAttributeBands> layoutsToBands
-
-
Constructor Detail
-
AttributeLayoutMap
public AttributeLayoutMap() throws Pack200Exception- Throws:
Pack200Exception
-
-
Method Detail
-
getDefaultAttributeLayouts
private static AttributeLayout[] getDefaultAttributeLayouts() throws Pack200Exception
- Throws:
Pack200Exception
-
add
public void add(AttributeLayout layout)
-
add
public void add(AttributeLayout layout, NewAttributeBands newBands)
-
checkMap
public void checkMap() throws Pack200ExceptionThe map should not contain the same layout and name combination more than once for each context.- Throws:
Pack200Exception- Thrown when the name layout/name combination exists twice for a context.
-
getAttributeBands
public NewAttributeBands getAttributeBands(AttributeLayout layout)
-
getAttributeLayout
public AttributeLayout getAttributeLayout(int index, int context)
-
getAttributeLayout
public AttributeLayout getAttributeLayout(java.lang.String name, int context)
-
getLayout
private java.util.Map<java.lang.Integer,AttributeLayout> getLayout(int context)
-
-