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

public Class AttributeLayoutMap

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collection, .HashMap, .List, .Map, org.apache.commons.compress.harmony.pack200.Pack200Exception

Stores 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

Modifier and TypeField and Description
private final Map<Integer, AttributeLayout>
private final Map<Integer, AttributeLayout>
private final Map<Integer, AttributeLayout>
private final Map<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>.

private final Map<AttributeLayout, NewAttributeBands>
private final Map<Integer, AttributeLayout>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(final AttributeLayout layout)

public void
add(final AttributeLayout layout, final NewAttributeBands newBands)

public void
checkMap()

The map should not contain the same layout and name combination more than once for each context.

public NewAttributeBands
public AttributeLayout
getAttributeLayout(final int index, final int context)

public AttributeLayout
getAttributeLayout(final String name, final int context)

private static AttributeLayout[]
private Map<Integer, AttributeLayout>
getLayout(final int context)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classLayoutsback to summary
private final Map<Integer, AttributeLayout> classLayouts
codeLayoutsback to summary
private final Map<Integer, AttributeLayout> codeLayouts
fieldLayoutsback to summary
private final Map<Integer, AttributeLayout> fieldLayouts
layoutsback to summary
private final Map<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>.

Annotations
@SuppressWarnings:unchecked
layoutsToBandsback to summary
private final Map<AttributeLayout, NewAttributeBands> layoutsToBands
methodLayoutsback to summary
private final Map<Integer, AttributeLayout> methodLayouts

Constructor Detail

AttributeLayoutMapback to summary
public AttributeLayoutMap() throws Pack200Exception

Method Detail

addback to summary
public void add(final AttributeLayout layout)
addback to summary
public void add(final AttributeLayout layout, final NewAttributeBands newBands)
checkMapback to summary
public void checkMap() throws Pack200Exception

The map should not contain the same layout and name combination more than once for each context.

Exceptions
Pack200Exception:
Thrown when the name layout/name combination exists twice for a context.
getAttributeBandsback to summary
public NewAttributeBands getAttributeBands(final AttributeLayout layout)
getAttributeLayoutback to summary
public AttributeLayout getAttributeLayout(final int index, final int context)
getAttributeLayoutback to summary
public AttributeLayout getAttributeLayout(final String name, final int context)
getDefaultAttributeLayoutsback to summary
private static AttributeLayout[] getDefaultAttributeLayouts() throws Pack200Exception
getLayoutback to summary
private Map<Integer, AttributeLayout> getLayout(final int context)