Package Summary Overview Summary

Module java.base
Package java.lang.classfilePREVIEW

# Interface TypeAnnotation.LocalVarTargetInfo

Enclosing interface:
  `TypeAnnotationPREVIEW`

public static sealed interface TypeAnnotation.LocalVarTargetInfo
`LocalVarTargetInfo` is a preview API of the Java platform.
Programs can only use `LocalVarTargetInfo` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Indicates a range of code array offsets within which a local variable has a value, and the index into the local variable array of the current frame at which that local variable can be found.

Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `LabelPREVIEW`
  `endLabel()`
  The given local variable has a value at indices into the code array in the interval [start_pc, start_pc + length), that is, between start_pc inclusive and start_pc + length exclusive.
  `int`
  `index()`
  The given local variable must be at index in the local variable array of the current frame.
  `static TypeAnnotation.LocalVarTargetInfoPREVIEW`
  `of (LabelPREVIEW startLabel, LabelPREVIEW endLabel, int index)`
  Returns local variable target info.
  `LabelPREVIEW`
  `startLabel()`
  The given local variable has a value at indices into the code array in the interval [start_pc, start_pc + length), that is, between start_pc inclusive and start_pc + length exclusive.

- ## Method Details

  - ### startLabel

    LabelPREVIEW startLabel()
    The given local variable has a value at indices into the code array in the interval [start_pc, start_pc + length), that is, between start_pc inclusive and start_pc + length exclusive.
    Returns:
      the start of the bytecode section

  - ### endLabel

    LabelPREVIEW endLabel()
    The given local variable has a value at indices into the code array in the interval [start_pc, start_pc + length), that is, between start_pc inclusive and start_pc + length exclusive.
    Returns:
      the end of the bytecode section

  - ### index

    int index()
    The given local variable must be at index in the local variable array of the current frame. If the local variable at index is of type double or long, it occupies both index and index + 1.
    Returns:
      the index into the local variables

  - ### of

    static TypeAnnotation.LocalVarTargetInfoPREVIEW of (LabelPREVIEW startLabel, LabelPREVIEW endLabel, int index)
    Returns local variable target info.
    Parameters:
      `startLabel` - the code label indicating start of an interval where variable has value
      `endLabel` - the code label indicating start of an interval where variable has value
      `index` - index into the local variables
    Returns:
      local variable target info