Class AttributeLayout

java.lang.Object
org.apache.commons.compress.harmony.unpack200.AttributeLayout
All Implemented Interfaces:
IMatcher

public class AttributeLayout extends Object implements IMatcher
Defines a layout that describes how an attribute will be transmitted.
  • Field Details

  • Constructor Details

  • Method Details

    • getValue

      private static ClassFileEntry getValue(String layout, long longIndex, SegmentConstantPool pool) throws Pack200Exception
      Throws:
      Pack200Exception
    • getCodec

      public Codec getCodec()
      Gets the Codec based on the layout.
      Returns:
      the Codec.
    • getContext

      public int getContext()
      Gets the context.
      Returns:
      the context.
    • getIndex

      public int getIndex()
      Gets the index.
      Returns:
      the index.
    • getLayout

      public String getLayout()
      Gets the layout.
      Returns:
      the layout.
    • getName

      public String getName()
      Gets the name.
      Returns:
      the name.
    • getValue

      public ClassFileEntry getValue(long longIndex, SegmentConstantPool pool) throws Pack200Exception
      Gets the ClassFileEntry for the given input.
      Parameters:
      longIndex - An index into the segment constant pool.
      pool - the segment constant pool.
      Returns:
      the matching ClassFileEntry.
      Throws:
      Pack200Exception - if the input is invalid.
    • getValue

      public ClassFileEntry getValue(long longIndex, String type, SegmentConstantPool pool) throws Pack200Exception
      Gets the ClassFileEntry for the given input.
      Parameters:
      longIndex - An index into the segment constant pool.
      type - the Java type signature.
      pool - the segment constant pool.
      Returns:
      the matching ClassFileEntry.
      Throws:
      Pack200Exception - if the input is invalid.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isDefaultLayout

      public boolean isDefaultLayout()
      Tests whether this is the default layout.
      Returns:
      whether this is the default layout.
    • matches

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

      public int numBackwardsCallables()
      Gets the backward call count.
      Returns:
      the backward call count.
    • setBackwardsCallCount

      public void setBackwardsCallCount(int backwardsCallCount)
      Sets the backward call count.
      Parameters:
      backwardsCallCount - the backward call count.
    • toString

      public String toString()
      Overrides:
      toString in class Object