Generics in the Java Programming Language
Author:
Gilad Bracha
Book Descriptions:
JDK 1.5 introduces several extensions to the Java programming language. One of these
is the introduction of generics.
This tutorial is aimed at introducing you to generics. You may be familiar with
similar constructs from other languages, most notably C++ templates. If so, you’ll soon
see that there are both similarities and important differences. If you are not familiar
with look-a-alike constructs from elsewhere, all the better; you can start afresh, without
unlearning any misconceptions.
is the introduction of generics.
This tutorial is aimed at introducing you to generics. You may be familiar with
similar constructs from other languages, most notably C++ templates. If so, you’ll soon
see that there are both similarities and important differences. If you are not familiar
with look-a-alike constructs from elsewhere, all the better; you can start afresh, without
unlearning any misconceptions.
topics include:
1 Introduction
2 Defining Simple Generics
3 Generics and Subtyping
4 Wildcards
4.1 Bounded Wildcards . . . . . .... . . . . . . . . .
5 Generic Methods
6 Interoperating with Legacy Code
6.1 Using Legacy Code in Generic Code . . . . . .
6.2 Erasure and Translation . . . . . . . .. . . . . .
6.3 Using Generic Code in Legacy Code . . . . . .
7 The Fine Print
7.1 A Generic Class is Shared by all its Invocations
7.2 Casts and InstanceOf . . . .. .. .. . . . . . . . .
7.3 Arrays . . . . . . .... . . . . .. ... . . . . . . . . .
8 Class Literals as Run-time Type Tokens
9 More Fun with Wildcards
9.1 Wildcard Capture . . . . . . . ..... . . . . . . . .
10 Converting Legacy Code to Use Generics
download link:
http://www.ziddu.com/download/3121098/generics-tutorial.pdf.html
0 comments
Post a Comment