Package org.apache.commons.compress.harmony.unpack200

# Class AttributeLayout

java.lang.Object
org.apache.commons.compress.harmony.unpack200.AttributeLayout

All Implemented Interfaces:
  `IMatcher`

public class AttributeLayout extends Object implements IMatcher
AttributeLayout defines a layout that describes how an attribute will be transmitted.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ACC_ABSTRACT`
  "ACC_ABSTRACT"
  `static final String`
  `ACC_ANNOTATION`
  "ACC_ANNOTATION"
  `static final String`
  `ACC_ENUM`
  "ACC_ENUM"
  `static final String`
  `ACC_FINAL`
  "ACC_FINAL"
  `static final String`
  `ACC_INTERFACE`
  "ACC_INTERFACE"
  `static final String`
  `ACC_NATIVE`
  "ACC_NATIVE"
  `static final String`
  `ACC_PRIVATE`
  "ACC_PRIVATE"
  `static final String`
  `ACC_PROTECTED`
  "ACC_PROTECTED"
  `static final String`
  `ACC_PUBLIC`
  "ACC_PUBLIC"
  `static final String`
  `ACC_STATIC`
  "ACC_STATIC"
  `static final String`
  `ACC_STRICT`
  "ACC_STRICT"
  `static final String`
  `ACC_SYNCHRONIZED`
  "ACC_SYNCHRONIZED"
  `static final String`
  `ACC_SYNTHETIC`
  "ACC_SYNTHETIC"
  `static final String`
  `ACC_TRANSIENT`
  "ACC_TRANSIENT"
  `static final String`
  `ACC_VOLATILE`
  "ACC_VOLATILE"
  `static final String`
  `ATTRIBUTE_ANNOTATION_DEFAULT`
  "AnnotationDefault"
  `static final String`
  `ATTRIBUTE_CLASS_FILE_VERSION`
  "class-file version"
  `static final String`
  `ATTRIBUTE_CODE`
  "Code"
  `static final String`
  `ATTRIBUTE_CONSTANT_VALUE`
  "ConstantValue"
  `static final String`
  `ATTRIBUTE_DEPRECATED`
  "Deprecated"
  `static final String`
  `ATTRIBUTE_ENCLOSING_METHOD`
  "EnclosingMethod"
  `static final String`
  `ATTRIBUTE_EXCEPTIONS`
  "Exceptions"
  `static final String`
  `ATTRIBUTE_INNER_CLASSES`
  "InnerClasses"
  `static final String`
  `ATTRIBUTE_LINE_NUMBER_TABLE`
  "LineNumberTable"
  `static final String`
  `ATTRIBUTE_LOCAL_VARIABLE_TABLE`
  "LocalVariableTable"
  `static final String`
  `ATTRIBUTE_LOCAL_VARIABLE_TYPE_TABLE`
  "LocalVariableTypeTable"
  `static final String`
  `ATTRIBUTE_RUNTIME_INVISIBLE_ANNOTATIONS`
  "RuntimeInvisibleAnnotations"
  `static final String`
  `ATTRIBUTE_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS`
  "RuntimeInvisibleParameterAnnotations"
  `static final String`
  `ATTRIBUTE_RUNTIME_VISIBLE_ANNOTATIONS`
  "RuntimeVisibleAnnotations"
  `static final String`
  `ATTRIBUTE_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS`
  "RuntimeVisibleParameterAnnotations"
  `static final String`
  `ATTRIBUTE_SIGNATURE`
  "Signature"
  `static final String`
  `ATTRIBUTE_SOURCE_FILE`
  "SourceFile"
  `static final int`
  `CONTEXT_CLASS`
  0
  `static final int`
  `CONTEXT_CODE`
  3
  `static final int`
  `CONTEXT_FIELD`
  1
  `static final int`
  `CONTEXT_METHOD`
  2
  `static final String[]`
  `contextNames`
  Context names.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AttributeLayout(String name, int context, String layout, int index)`
  Constructs a default AttributeLayout (equivalent to `new AttributeLayout(name, context, layout, index, true);`)
  `AttributeLayout(String name, int context, String layout, int index, boolean isDefault)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Codec`
  `getCodec()`
  `int`
  `getContext()`
  `int`
  `getIndex()`
  `String`
  `getLayout()`
  `String`
  `getName()`
  `ClassFileEntry`
  `getValue(long value, String type, SegmentConstantPool pool)`
  `ClassFileEntry`
  `getValue(long value, SegmentConstantPool pool)`
  `int`
  `hashCode()`
  `boolean`
  `isDefaultLayout()`
  `boolean`
  `matches(long value)`
  `int`
  `numBackwardsCallables()`
  `void`
  `setBackwardsCallCount(int backwardsCallCount)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### ACC_ABSTRACT

    public static final String ACC_ABSTRACT
    "ACC_ABSTRACT"
    See Also:
      - Constant Field Values

  - ### ACC_ANNOTATION

    public static final String ACC_ANNOTATION
    "ACC_ANNOTATION"
    See Also:
      - Constant Field Values

  - ### ACC_ENUM

    public static final String ACC_ENUM
    "ACC_ENUM"
    See Also:
      - Constant Field Values

  - ### ACC_FINAL

    public static final String ACC_FINAL
    "ACC_FINAL"
    See Also:
      - Constant Field Values

  - ### ACC_INTERFACE

    public static final String ACC_INTERFACE
    "ACC_INTERFACE"
    See Also:
      - Constant Field Values

  - ### ACC_NATIVE

    public static final String ACC_NATIVE
    "ACC_NATIVE"
    See Also:
      - Constant Field Values

  - ### ACC_PRIVATE

    public static final String ACC_PRIVATE
    "ACC_PRIVATE"
    See Also:
      - Constant Field Values

  - ### ACC_PROTECTED

    public static final String ACC_PROTECTED
    "ACC_PROTECTED"
    See Also:
      - Constant Field Values

  - ### ACC_PUBLIC

    public static final String ACC_PUBLIC
    "ACC_PUBLIC"
    See Also:
      - Constant Field Values

  - ### ACC_STATIC

    public static final String ACC_STATIC
    "ACC_STATIC"
    See Also:
      - Constant Field Values

  - ### ACC_STRICT

    public static final String ACC_STRICT
    "ACC_STRICT"
    See Also:
      - Constant Field Values

  - ### ACC_SYNCHRONIZED

    public static final String ACC_SYNCHRONIZED
    "ACC_SYNCHRONIZED"
    See Also:
      - Constant Field Values

  - ### ACC_SYNTHETIC

    public static final String ACC_SYNTHETIC
    "ACC_SYNTHETIC"
    See Also:
      - Constant Field Values

  - ### ACC_TRANSIENT

    public static final String ACC_TRANSIENT
    "ACC_TRANSIENT"
    See Also:
      - Constant Field Values

  - ### ACC_VOLATILE

    public static final String ACC_VOLATILE
    "ACC_VOLATILE"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_ANNOTATION_DEFAULT

    public static final String ATTRIBUTE_ANNOTATION_DEFAULT
    "AnnotationDefault"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_CLASS_FILE_VERSION

    public static final String ATTRIBUTE_CLASS_FILE_VERSION
    "class-file version"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_CODE

    public static final String ATTRIBUTE_CODE
    "Code"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_CONSTANT_VALUE

    public static final String ATTRIBUTE_CONSTANT_VALUE
    "ConstantValue"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_DEPRECATED

    public static final String ATTRIBUTE_DEPRECATED
    "Deprecated"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_ENCLOSING_METHOD

    public static final String ATTRIBUTE_ENCLOSING_METHOD
    "EnclosingMethod"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_EXCEPTIONS

    public static final String ATTRIBUTE_EXCEPTIONS
    "Exceptions"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_INNER_CLASSES

    public static final String ATTRIBUTE_INNER_CLASSES
    "InnerClasses"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_LINE_NUMBER_TABLE

    public static final String ATTRIBUTE_LINE_NUMBER_TABLE
    "LineNumberTable"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_LOCAL_VARIABLE_TABLE

    public static final String ATTRIBUTE_LOCAL_VARIABLE_TABLE
    "LocalVariableTable"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_LOCAL_VARIABLE_TYPE_TABLE

    public static final String ATTRIBUTE_LOCAL_VARIABLE_TYPE_TABLE
    "LocalVariableTypeTable"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_RUNTIME_INVISIBLE_ANNOTATIONS

    public static final String ATTRIBUTE_RUNTIME_INVISIBLE_ANNOTATIONS
    "RuntimeInvisibleAnnotations"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS

    public static final String ATTRIBUTE_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS
    "RuntimeInvisibleParameterAnnotations"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_RUNTIME_VISIBLE_ANNOTATIONS

    public static final String ATTRIBUTE_RUNTIME_VISIBLE_ANNOTATIONS
    "RuntimeVisibleAnnotations"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS

    public static final String ATTRIBUTE_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS
    "RuntimeVisibleParameterAnnotations"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_SIGNATURE

    public static final String ATTRIBUTE_SIGNATURE
    "Signature"
    See Also:
      - Constant Field Values

  - ### ATTRIBUTE_SOURCE_FILE

    public static final String ATTRIBUTE_SOURCE_FILE
    "SourceFile"
    See Also:
      - Constant Field Values

  - ### CONTEXT_CLASS

    public static final int CONTEXT_CLASS
    0
    See Also:
      - Constant Field Values

  - ### CONTEXT_CODE

    public static final int CONTEXT_CODE
    3
    See Also:
      - Constant Field Values

  - ### CONTEXT_FIELD

    public static final int CONTEXT_FIELD
    1
    See Also:
      - Constant Field Values

  - ### CONTEXT_METHOD

    public static final int CONTEXT_METHOD
    2
    See Also:
      - Constant Field Values

  - ### contextNames

    public static final String[] contextNames
    Context names.

- ## Constructor Details

  - ### AttributeLayout

    public AttributeLayout(String name, int context, String layout, int index) throws Pack200Exception
    Constructs a default AttributeLayout (equivalent to `new AttributeLayout(name, context, layout, index, true);`)
    Parameters:
      `name` - TODO
      `context` - TODO
      `layout` - TODO
      `index` - TODO
    Throws:
      `Pack200Exception` - Attribute context out of range.
      `Pack200Exception` - Cannot have a null layout.
      `Pack200Exception` - Cannot have an unnamed layout.

  - ### AttributeLayout

    public AttributeLayout(String name, int context, String layout, int index, boolean isDefault) throws Pack200Exception
    Throws:
      `Pack200Exception`

- ## Method Details

  - ### getCodec

    public Codec getCodec()

  - ### getContext

    public int getContext()

  - ### getIndex

    public int getIndex()

  - ### getLayout

    public String getLayout()

  - ### getName

    public String getName()

  - ### getValue

    public ClassFileEntry getValue(long value, SegmentConstantPool pool) throws Pack200Exception
    Throws:
      `Pack200Exception`

  - ### getValue

    public ClassFileEntry getValue(long value, String type, SegmentConstantPool pool) throws Pack200Exception
    Throws:
      `Pack200Exception`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### isDefaultLayout

    public boolean isDefaultLayout()

  - ### matches

    public boolean matches(long value)
    Specified by:
      `matches` in interface `IMatcher`

  - ### numBackwardsCallables

    public int numBackwardsCallables()

  - ### setBackwardsCallCount

    public void setBackwardsCallCount(int backwardsCallCount)

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`