Declaration order is significant only for local variables, local classes and interfaces, and the order of field initializers in a class or interface. The Java programming language does not require classes and interfaces, or their members, to be declared before they are used. Chapter 1: Introduction 1.1 Organization of the SpecificationĬhapter 6 describes declarations and names, and how to determine what names mean (that is, which declaration a name denotes). Explanation and discussion, as needed, is set aside in grey boxes. New text is indicated like this and deleted text is indicated like this. These changes are general enough to support other forms of nested statics, should the language be enhanced to support them in the future.Ĭhanges are described with respect to existing sections of the Java Language Specification. There are two significant groups of changes:Įxpanding the syntax for local class declarations ( 14.3).Īdjusting the rules for references to variables ( 6.5.6.1), types ( 6.5.5.1), methods ( 15.12.3), and this ( 15.8.3, 15.9.2, 15.11.2, etc.) to handle references from these new contexts. See the JEP Draft for additional details. These enhancements are part of the Records feature. Such classes and interfaces are implicitly static, with no access to enclosing instances, local variables, and type parameters. This document describes changes to the Java Language Specification as modified by Consistent Class and Interface Terminology to support local interface and enum class declarations. 16.2.3 Local Class Declaration Statements and Interface Declarations.16.2 Definite Assignment and Statements.15.13.1 Compile-Time Declaration of a Method Reference.15.12.3 Compile-Time Step 3: Is the Chosen Method Appropriate?.15.12.1 Compile-Time Step 1: Determine Class or Interface to Search.15.11.2 Accessing Superclass Members using super.15.9 Class Instance Creation Expressions.14.4.1 Local Variable Declarators and Types.14.4 Local Variable Declaration Statements.14.3 Local Class and Interface Declarations.9.1.2 Generic Interfaces and Type Parameters.8.8.7.1 Explicit Constructor Invocations.8.5.1 Static Member Class and Interface Declarations.8.5 Member Class and Interface Declarations.8.1.3 Inner Classes and Enclosing Instances. 8.1.2 Generic Classes and Type Parameters.6.7 Fully Qualified Names and Canonical Names.6.5.2 Reclassification of Contextually Ambiguous Names.Local Static Interfaces and Enum ClassesĬhanges to the Java® Language Specification Local Static Interfaces and Enum Classes This specification is not final and is subject to change.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |