public sealed interface InnerClassInfo
InnerClassesAttribute.InnerClasses Attribute| Modifier and Type | Method | Description |
|---|---|---|
default Set |
flags() |
Returns a set of flag enums denoting access permissions and properties of the nested class. |
int |
flagsMask() |
Returns a bit mask of flags denoting access permissions and properties of the inner class. |
default boolean |
has |
Returns whether a specific access flag is set. |
ClassEntry |
innerClass() |
Returns the nested class described by this entry. |
Optional |
innerName() |
Returns the simple name of this class, or empty if this class is anonymous. |
static InnerClassInfo |
of |
Returns a nested class description. |
static InnerClassInfo |
of |
Returns a nested class description. |
static InnerClassInfo |
of |
Returns a nested class description. |
Optional |
outerClass() |
Returns the class or interface of which this class is a member, if it is a member of a class or interface. |
ClassEntry innerClass()
Optional<ClassEntry> outerClass()
Optional<Utf8Entry> innerName()
int flagsMask()
[0,
0xFFFF].default Set<AccessFlag> flags()
IllegalArgumentException - if the flags mask has any undefined bit setdefault boolean has(AccessFlag flag)
flag - the access flagstatic InnerClassInfo of(ClassEntry innerClass, Optional<ClassEntry> outerClass, Optional<Utf8Entry> innerName, int flags)
innerClass - the nested class being describedouterClass - the class that has the nested class as a member, if it existsinnerName - the simple name of the nested class, if it is not anonymousflags - the inner class access flagsstatic InnerClassInfo of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, int flags)
innerClass - the nested class being describedouterClass - the class that has the nested class as a member, if it existsinnerName - the simple name of the nested class, if it is not anonymousflags - the inner class access flagsIllegalArgumentException - if innerClass or outerClass represents a primitive typestatic InnerClassInfo of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, AccessFlag... flags)
innerClass - the nested class being describedouterClass - the class that has the nested class as a member, if it existsinnerName - the name of the nested class, if it is not anonymousflags - the inner class access flagsIllegalArgumentException - if innerClass or outerClass represents a primitive type, or if any flag cannot be applied to the AccessFlag.Location.INNER_CLASS location
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/attribute/InnerClassInfo.html