Module java.base
Package java.lang.classfilePREVIEW

# Interface ClassFile.AttributeMapperOption

All Superinterfaces:
  `ClassFile.OptionPREVIEW`

Enclosing interface:
  `ClassFilePREVIEW`

public static sealed interface ClassFile.AttributeMapperOption extends ClassFile.OptionPREVIEW
`AttributeMapperOption` is a preview API of the Java platform.
Programs can only use `AttributeMapperOption` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Option describing attribute mappers for custom attributes. Default is only to process standard attributes.

Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Function<Utf8EntryPREVIEW,AttributeMapperPREVIEW<?>>`
  `attributeMapper()`
  Returns the function mapping attribute names to attribute mappers.
  `static ClassFile.AttributeMapperOptionPREVIEW`
  `of(Function<Utf8EntryPREVIEW,AttributeMapperPREVIEW<?>> attributeMapper)`
  Returns an option describing attribute mappers for custom attributes.

- ## Method Details

  - ### of

    static ClassFile.AttributeMapperOptionPREVIEW of(Function<Utf8EntryPREVIEW,AttributeMapperPREVIEW<?>> attributeMapper)
    Returns an option describing attribute mappers for custom attributes.
    Parameters:
      `attributeMapper` - a function mapping attribute names to attribute mappers
    Returns:
      an option describing attribute mappers for custom attributes

  - ### attributeMapper

    Function<Utf8EntryPREVIEW,AttributeMapperPREVIEW<?>> attributeMapper()
    Returns the function mapping attribute names to attribute mappers.
    Returns:
      the function mapping attribute names to attribute mappers