An import declaration allows a named type or a static member to be referred to by a simple name instead of a fully qualified name. The XL programming language defines four kinds of import declarations:
Import Declarations | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The first two kinds, single-type-import and type-import-on-demand declarations, are already known from the Java programming language. Thus, they are not explained here. The last two kinds, single-static-import and static-import-on-demand declarations, have been defined in the Java Language Specification, Third Edition, and are defined for the XL programming language, too.
A single-static-import declaration imports all accessible static members with the given name from the given type. For the details see the Java Language Specification, Third Edition.
A static-import-on-demand declaration imports all accessible static members declared in the given type as needed. For the details see the Java Language Specification, Third Edition.