org.apache.commons.compress.harmony.pack200

## Class NewAttribute

- java.lang.Object
- - org.objectweb.asm.Attribute
  - - org.apache.commons.compress.harmony.pack200.NewAttribute

- Direct Known Subclasses:
    NewAttribute.ErrorAttribute, NewAttribute.PassAttribute, NewAttribute.StripAttribute

      public class NewAttribute
      extends org.objectweb.asm.Attribute

  NewAttribute extends `Attribute` and manages unknown attributes encountered by ASM that have had a layout definition given to pack200 (e.g. via one of the -C, -M, -F or -D command line options)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `NewAttribute.ErrorAttribute` ErrorAttribute extends `NewAttribute` and manages attributes encountered by ASM that have had an error action specified to pack200 (e.g. via one of the -C, -M, -F or -D command line options such as -Cattribute-name=error)
    `static class` | `NewAttribute.PassAttribute` PassAttribute extends `NewAttribute` and manages attributes encountered by ASM that have had an pass action specified to pack200 (e.g. via one of the -C, -M, -F or -D command line options such as -Cattribute-name=pass)
    `static class` | `NewAttribute.StripAttribute` StripAttribute extends `NewAttribute` and manages attributes encountered by ASM that have had an strip action specified to pack200 (e.g. via one of the -C, -M, -F or -D command line options such as -Cattribute-name=strip)

  - ### Field Summary

    - ### Fields inherited from class org.objectweb.asm.Attribute

      `type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NewAttribute(org.objectweb.asm.ClassReader classReader, String type, String layout, byte[] contents, char[] buf, int codeOff, org.objectweb.asm.Label[] labels)`
    `NewAttribute(String type, String layout, int context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addContext(int context)`
    `byte[]` | `getBytes()`
    `org.objectweb.asm.Label` | `getLabel(int index)`
    `String` | `getLayout()`
    `boolean` | `isCodeAttribute()`
    `boolean` | `isContextClass()`
    `boolean` | `isContextCode()`
    `boolean` | `isContextField()`
    `boolean` | `isContextMethod()`
    `boolean` | `isUnknown()`
    `boolean` | `isUnknown(int context)`
    `protected org.objectweb.asm.Attribute` | `read(org.objectweb.asm.ClassReader cr, int off, int len, char[] buf, int codeOff, org.objectweb.asm.Label[] labels)`
    `String` | `readClass(int index)`
    `Object` | `readConst(int index)`
    `String` | `readUTF8(int index)`

    - ### Methods inherited from class org.objectweb.asm.Attribute

      `getLabels, write`

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

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

- - ### Constructor Detail

    - #### NewAttribute

          public NewAttribute(String type,
                              String layout,
                              int context)

    - #### NewAttribute

          public NewAttribute(org.objectweb.asm.ClassReader classReader,
                              String type,
                              String layout,
                              byte[] contents,
                              char[] buf,
                              int codeOff,
                              org.objectweb.asm.Label[] labels)

  - ### Method Detail

    - #### addContext

          public void addContext(int context)

    - #### isContextClass

          public boolean isContextClass()

    - #### isContextMethod

          public boolean isContextMethod()

    - #### isContextField

          public boolean isContextField()

    - #### isContextCode

          public boolean isContextCode()

    - #### getLayout

          public String getLayout()

    - #### isUnknown

          public boolean isUnknown()

      Overrides:
        `isUnknown` in class `org.objectweb.asm.Attribute`

    - #### isCodeAttribute

          public boolean isCodeAttribute()

      Overrides:
        `isCodeAttribute` in class `org.objectweb.asm.Attribute`

    - #### read

          protected org.objectweb.asm.Attribute read(org.objectweb.asm.ClassReader cr,
                                                     int off,
                                                     int len,
                                                     char[] buf,
                                                     int codeOff,
                                                     org.objectweb.asm.Label[] labels)

      Overrides:
        `read` in class `org.objectweb.asm.Attribute`

    - #### isUnknown

          public boolean isUnknown(int context)

    - #### readUTF8

          public String readUTF8(int index)

    - #### readClass

          public String readClass(int index)

    - #### readConst

          public Object readConst(int index)

    - #### getBytes

          public byte[] getBytes()

    - #### getLabel

          public org.objectweb.asm.Label getLabel(int index)

Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.