Interface InnerClassInfo
public sealed interface InnerClassInfo
Models a single inner class in the
InnerClassesAttribute
.- Since:
- 24
-
Method Summary
Modifier and TypeMethodDescriptiondefault Set
<AccessFlag> flags()
Returns a set of flag enums denoting access permissions and properties of the inner class.int
Returns a bit mask of flags denoting access permissions and properties of the inner class.default boolean
has
(AccessFlag flag) Returns whether a specific access flag is set.Returns the class described by this inner class description.Returns the simple name of this class, or empty if this class is anonymous.static InnerClassInfo
of
(ClassEntry innerClass, Optional<ClassEntry> outerClass, Optional<Utf8Entry> innerName, int flags) Returns an inner class description.static InnerClassInfo
Returns an inner class description.static InnerClassInfo
of
(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, AccessFlag... flags) Returns an inner class description.Returns the class or interface of which this class is a member, if it is a member of a class or interface.
-
Method Details
-
innerClass
ClassEntry innerClass()Returns the class described by this inner class description.- Returns:
- the class described by this inner class description
-
outerClass
Optional<ClassEntry> outerClass()Returns the class or interface of which this class is a member, if it is a member of a class or interface.- Returns:
- the class or interface of which this class is a member, if it is a member of a class or interface
-
innerName
-
flagsMask
int flagsMask()Returns a bit mask of flags denoting access permissions and properties of the inner class.- Returns:
- a bit mask of flags denoting access permissions and properties of the inner class
-
flags
Returns a set of flag enums denoting access permissions and properties of the inner class.- Returns:
- a set of flag enums denoting access permissions and properties of the inner class
-
has
Returns whether a specific access flag is set.- Parameters:
flag
- the access flag- Returns:
- whether a specific access flag is set
-
of
static InnerClassInfo of(ClassEntry innerClass, Optional<ClassEntry> outerClass, Optional<Utf8Entry> innerName, int flags) Returns an inner class description.- Parameters:
innerClass
- the inner class being describedouterClass
- the class containing the inner class, if anyinnerName
- the name of the inner class, if it is not anonymousflags
- the inner class access flags- Returns:
- an inner class description
-
of
static InnerClassInfo of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, int flags) Returns an inner class description.- Parameters:
innerClass
- the inner class being describedouterClass
- the class containing the inner class, if anyinnerName
- the name of the inner class, if it is not anonymousflags
- the inner class access flags- Returns:
- an inner class description
- Throws:
IllegalArgumentException
- ifinnerClass
orouterClass
represents a primitive type
-
of
static InnerClassInfo of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, AccessFlag... flags) Returns an inner class description.- Parameters:
innerClass
- the inner class being describedouterClass
- the class containing the inner class, if anyinnerName
- the name of the inner class, if it is not anonymousflags
- the inner class access flags- Returns:
- an inner class description
- Throws:
IllegalArgumentException
- ifinnerClass
orouterClass
represents a primitive type
-