更新时间:2021-06-10 18:50:15
coverpage
Title Page
Foreword
Contributors
About the author
About the reviewers
Acknowledgements
About Packt
Why subscribe?
Packt.com
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used in the book
Get in touch
Reviews
Kotlin – A First look
Technical requirements
Introduction to Kotlin
The history of Kotlin
Features of Kotlin
Getting started with Kotlin
Installing Kotlin
Installing Kotlin on Linux
Installing Kotlin on Windows
Installing Kotlin on Mac
Compiling and running
A quick tour of Kotlin
Declaring variables
Data types in Kotlin
Warnings
Type inference
String templates
Multi-line String Literals
Expressions over statements
Functions
Default arguments
Named arguments
varargs and spread
The for loop
Iterating over a list
When clause
The nullable type
Lambda expressions in Kotlin
Extension functions
Classes in Kotlin
Constructors
Static functions
Kotlin programming style and Syntax
Summary
Kotlin – The Game Changer
Why Kotlin is the game changer
Interoperability with Java
Functional paradigms
Immutability
Null safety
Kotlin versus Java
Null safety issue
Arrays in Kotlin are invariant
No checked exceptions
Concise code
Configuring Kotlin in the project
Creating a simple Kotlin project
Maven project
Configuring Kotlin in Eclipse
Working with coroutines
Coroutines in Kotlin
Using Kotlin with Java
Kotlin in an existing Java project
Java in a Kotlin project
An Overview of Java EE and Kotlin
Overview of Java EE
New features and enhancements in Java EE 8
Introduction to the Java EE architecture
Integrating Kotlin plugins
The all-open compiler plugin
Using the all-open plugin in Maven
Using the all-open plugin in Gradle
No-arg compiler plugin
Using the no-org plugin in Maven
Using the no-org plugin in Gradle
The kotlin-spring compiler plugin
Using the kotlin-spring plugin in Maven
Using the kotlin-spring plugin in Gradle
Using the kotlin-spring plugin in CLI
JPA plugin
Using the kotlin-jpa plugin in Maven
Using the kotlin-jpa plugin in Gradle
Using the kotlin-jpa plugin in CLI
The SAM-with-receiver compiler plugin
Using the SAM-with-receiver plugin in Maven
Using the SAM-with-receiver plugin in Gradle
Using the SAM-with-receiver plugin in CLI