# Uses of Interface
java.lang.classfile.attribute.EnclosingMethodAttribute

Packages that use EnclosingMethodAttribute
Package
Description
java.lang.classfile
Provides classfile parsing, generation, and transformation library.
java.lang.classfile.attribute
Provides interfaces describing `class` file attributes for the `java.lang.classfile` library.

## Uses of EnclosingMethodAttribute in java.lang.classfile

Methods in java.lang.classfile that return types with arguments of type EnclosingMethodAttribute
Modifier and Type
Method
Description
`static AttributeMapper<EnclosingMethodAttribute>`
Attributes.`enclosingMethod()`
Returns the mapper for the `EnclosingMethod` attribute.

## Uses of EnclosingMethodAttribute in java.lang.classfile.attribute

Subinterfaces with type arguments of type EnclosingMethodAttribute in java.lang.classfile.attribute
Modifier and Type
Interface
Description
`interface`
`EnclosingMethodAttribute`
Models the `EnclosingMethod` attribute (JVMS §4.7.7), which indicates that this class is a local or anonymous class, and indicates the enclosing method or constructor of this class if this class is enclosed in exactly one method or constructor.
Methods in java.lang.classfile.attribute that return EnclosingMethodAttribute
Modifier and Type
Method
Description
`static EnclosingMethodAttribute`
EnclosingMethodAttribute.`of(ClassEntry className, Optional<NameAndTypeEntry> method)`
Returns an `EnclosingMethod` attribute.
`static EnclosingMethodAttribute`
EnclosingMethodAttribute.`of(ClassDesc className, Optional<String> methodName, Optional<MethodTypeDesc> methodType)`
Returns an `EnclosingMethod` attribute.