Module java.base
Package java.lang.classfile.attribute

# Interface CharacterRangeInfo

≠
public abstract sealed interface CharacterRangeInfo
permits jdk.internal.classfile.impl.UnboundAttribute.UnboundCharacterRangeInfo

## Methods

- =
  public abstract int characterRangeEnd()
- =
  public abstract int characterRangeStart()
- =
  public abstract int endPc()
- ≠
  public abstract int flags()
  Comparing jdk-master and valhalla-csr-open

  ### flags

  int flags()
  Returns the flags of this character range entry.

  The value of the flags item describes the kind of range. Multiple flags may be set within flags.

  - `CharacterRange.FLAG_STATEMENT` Range is a Statement (except ExpressionStatement), StatementExpression (JLS §14.8), as well as each `VariableDeclaratorId = VariableInitializer` of LocalVariableDeclarationStatement (JLS §14.4) or FieldDeclaration (JLS §8.3) in the grammar.
  - `CharacterRange.FLAG_BLOCK` Range is a Block in the grammar.
  - `CharacterRange.FLAG_ASSIGNMENT` Range is an assignment expression - `Expression1 AssignmentOperator Expression1` in the grammar as well as increment and decrement expressions (both prefix and postfix).
  - `CharacterRange.FLAG_FLOW_CONTROLLER` An expression whose value will affect control flow. `Flowcon` in the following:

        if ( Flowcon ) Statement [else Statement]
        for ( ForInitOpt ; [Flowcon] ; ForUpdateOpt ) Statement
        while ( Flowcon ) Statement
        do Statement while ( Flowcon ) ;
        switch ( Flowcon ) { SwitchBlockStatementGroups }
        Flowcon || Expression3
        Flowcon && Expression3
        Flowcon ? Expression : Expression1

  - `CharacterRange.FLAG_FLOW_TARGET` Statement or expression effected by a CRT_FLOW_CONTROLLER. `Flowtarg` in the following:

        if ( Flowcon ) Flowtarg [else Flowtarg]
        for ( ForInitOpt ; [Flowcon] ; ForUpdateOpt ) Flowtarg
        while ( Flowcon ) Flowtarg
        do Flowtarg while ( Flowcon ) ;
        Flowcon || Flowtarg
        Flowcon && Flowtarg
        Flowcon ? Flowtarg : Flowtarg

  - `CharacterRange.FLAG_INVOKE` Method invocation. For example: Identifier Arguments.
  - `CharacterRange.FLAG_CREATE` New object creation. For example: new Creator.
  - `CharacterRange.FLAG_BRANCH_TRUE` A condition encoded in the branch instruction immediately contained in the code range for this item is not inverted towards the corresponding branch condition in the source code. I.e. actual jump occurs if and only if the the source code branch condition evaluates to true. Entries of this type are produced only for conditions that are listed in the description of CRT_FLOW_CONTROLLER flag. The source range for the entry contains flow controlling expression. start_pc field for an entry of this type must point to a branch instruction: if_acmp<cond>, if_icmp<cond>, if<cond>, ifnonull, ifnull or goto. CRT_BRANCH_TRUE and CRT_BRANCH_FALSE are special kinds of entries that can be used to determine what branch of a condition was chosen during the runtime.
  - `CharacterRange.FLAG_BRANCH_FALSE` A condition encoded in the branch instruction immediately contained in the code range for this item is inverted towards the corresponding branch condition in the source code. I.e. actual jump occurs if and only if the the source code branch condition evaluates to false. Entries of this type are produced only for conditions that are listed in the description of CRT_FLOW_CONTROLLER flag. The source range for the entry contains flow controlling expression. start_pc field for an entry of this type must point to a branch instruction: if_acmp<cond>, if_icmp<cond>, if<cond>, ifnonull, ifnull or goto.

  All bits of the flags item not assigned above are reserved for future use. They should be set to zero in generated class files and should be ignored by Java virtual machine implementations.

  Returns:
    the flags of this character range entry
  See Also:
    - `CharacterRange.flags()`
- =
  public static java.lang.classfile.attribute.CharacterRangeInfo of(int arg0, int arg1, int arg2, int arg3, int arg4)
- =
  public abstract int startPc()

## Summary

Differences
| Elements | Comments | Descriptions | Total
Added | Changed | Removed | Added | Changed | Removed | Added | Changed | Removed
--- | --- | --- | --- | --- | --- | --- | --- | ---
flags() |  |  |  |  |  |  | 2 |  |  | 2
Total |  |  |  |  |  |  | 2 |  |  | 2