Package Summary Overview Summary

Module java.base
Package java.lang.classfile.attributePREVIEW

# Interface UnknownAttribute

All Superinterfaces:
  `AttributePREVIEW<UnknownAttributePREVIEW>`, `ClassElementPREVIEW`, `ClassFileElementPREVIEW`, `FieldElementPREVIEW`, `MethodElementPREVIEW`, `WritableElementPREVIEW<UnknownAttributePREVIEW>`

public sealed interface UnknownAttribute extends AttributePREVIEW<UnknownAttributePREVIEW>, ClassElementPREVIEW, MethodElementPREVIEW, FieldElementPREVIEW
`UnknownAttribute` is a preview API of the Java platform.
Programs can only use `UnknownAttribute` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models an unknown attribute on a class, method, or field.

Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `contents()`
  Returns the uninterpreted contents of the attribute payload.

  ### Methods declared in interface java.lang.classfile.AttributePREVIEW

  `attributeMapper, attributeName`

  ### Methods declared in interface java.lang.classfile.WritableElementPREVIEW

  `writeTo`

- ## Method Details

  - ### contents

    byte[] contents()
    Returns the uninterpreted contents of the attribute payload.
    Returns:
      the uninterpreted contents of the attribute payload