Interface ClassfileVersion

All Superinterfaces:
ClassElement, ClassfileElement
All Known Implementing Classes:
ClassfileVersionImpl

public sealed interface ClassfileVersion extends ClassElement permits ClassfileVersionImpl
Models the classfile version information for a class. Delivered as a ClassElement when traversing the elements of a ClassModel.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the major classfile version.
    int
    Returns the minor classfile version.
    of(int majorVersion, int minorVersion)
    Returns a ClassfileVersion element.
  • Method Details

    • majorVersion

      int majorVersion()
      Returns the major classfile version.
      Returns:
      the major classfile version
    • minorVersion

      int minorVersion()
      Returns the minor classfile version.
      Returns:
      the minor classfile version
    • of

      static ClassfileVersion of(int majorVersion, int minorVersion)
      Returns a ClassfileVersion element.
      Parameters:
      majorVersion - the major classfile version
      minorVersion - the minor classfile version
      Returns:
      a ClassfileVersion element