MethodElement (Java SE 25 & JDK 25)
Description: declaration: module: java.base, package: java.lang.classfile, interface: MethodElement
Keywords: java.lang.classfile.MethodElement interface

# Interface MethodElement

All Superinterfaces:
  `ClassFileElement`

All Known Subinterfaces:
  `AccessFlags, AnnotationDefaultAttribute, CodeAttribute, CodeModel, DeprecatedAttribute, ExceptionsAttribute, MethodParametersAttribute, RuntimeInvisibleAnnotationsAttribute, RuntimeInvisibleParameterAnnotationsAttribute, RuntimeInvisibleTypeAnnotationsAttribute, RuntimeVisibleAnnotationsAttribute, RuntimeVisibleParameterAnnotationsAttribute, RuntimeVisibleTypeAnnotationsAttribute, SignatureAttribute, SyntheticAttribute, UnknownAttribute`

All Known Implementing Classes:
  `CustomAttribute`

public sealed interface MethodElement extends ClassFileElement permits AccessFlags, CodeModel, CustomAttribute<T>, AnnotationDefaultAttribute, DeprecatedAttribute, ExceptionsAttribute, MethodParametersAttribute, RuntimeInvisibleAnnotationsAttribute, RuntimeInvisibleParameterAnnotationsAttribute, RuntimeInvisibleTypeAnnotationsAttribute, RuntimeVisibleAnnotationsAttribute, RuntimeVisibleParameterAnnotationsAttribute, RuntimeVisibleTypeAnnotationsAttribute, SignatureAttribute, SyntheticAttribute, UnknownAttribute
Marker interface for a member element of a `MethodModel`. Such an element can appear when traversing a `MethodModel` unless otherwise specified, be supplied to a `MethodBuilder`, and be processed by a `MethodTransform`.

`AccessFlags` is the only member element of a method that appear exactly once during the traversal of a `MethodModel`.

Sealed Class Hierarchy Graph:
Since:
  24
See Also:
  - Membership Elements
  - `ClassElement`
  - `FieldElement`
  - `CodeElement`