Expand description
Item types (class, interface, enum, record, module declarations).
Structs§
- Annotation
Element - An annotation element declaration.
- Annotation
Interface Body - Annotation interface body.
- Annotation
Interface Decl - An annotation interface declaration:
@interface Name { ... }. - Class
Body Decl List - Class body:
{ members }. - Class
Decl - A class declaration.
- Compact
Constructor Decl - A compact constructor declaration for records.
- Constructor
Body - A constructor body.
- Constructor
Decl - A constructor declaration.
- Enum
Body - Enum body:
{ constants [,] [members] }. - Enum
Constant - An enum constant:
NAME[(args)] [{ class body }]. - Enum
Decl - An enum declaration.
- Extends
Clause - An
extendsclause:extends SuperClass. - Field
Decl - A field declaration:
[modifiers] type name [= expr] [, name [= expr]] ;. - Implements
Clause - An
implementsclause:implements Interface1, Interface2. - Instance
Init - An instance initializer.
- Interface
Body - An interface body:
{ members }. - Interface
Decl - An interface declaration.
- Interface
Extends Clause - An interface extends clause:
extends Interface1, Interface2. - Method
Decl - A method declaration.
- Module
Decl - A module declaration.
- Permits
Clause - A
permitsclause:permits Sub1, Sub2. - Receiver
Parameter - A receiver parameter:
Type [name.] this. - Record
Body - Record body:
{ members }. - Record
Components - Record components:
(Type name, Type name, ...). - Record
Decl - A record declaration (Java 16+).
- Static
Init - A static initializer.
- Throws
Clause - A throws clause:
throws Type1, Type2.
Enums§
- Annotation
Interface Member - A member of an annotation interface.
- Class
Body Decl - A declaration inside a class body.
- Explicit
Constructor Call - An explicit constructor invocation:
this(args)orsuper(args). - Formal
Parameter - A formal parameter of a method or constructor.
- Interface
Member Decl - A member declaration inside an interface.
- Method
Return Type - The return type of a method.
- Modifier
- A modifier (keyword or annotation).
- Module
Directive - A module directive.
- Record
Body Decl - A member of a record body.
- Record
Component - A single record component.
- Requires
Modifier - Requires modifier:
transitive,static. - Type
Decl - A top-level type declaration or semicolon.