The Advantage of Type Parameters .........................................
Defining a Simple Generic Class ...........................................................
Bounds for Type Variables ......................................................................
Type Erasure ..............................................................................
Translating Generic Methods ..................................................
ptg18360597
429
Calling Legacy Code .................................................................
8.5.4
430
Restrictions and Limitations ..................................................................
8.6
430
Type Parameters Cannot Be
Instantiated with Primitive
Types ...........................................................................................
8.6.1
431
Runtime Type Inquiry Only Works with Raw Types ...........
8.6.2
431
You Cannot Create Arrays of Parameterized Types ............
8.6.3
432
Varargs Warnings ......................................................................
8.6.4
433
You Cannot Instantiate Type Variables ..................................
8.6.5
434
You Cannot Construct a Generic Array .................................
8.6.6
436
Type Variables Are Not Valid in Static Contexts of Generic
Classes .........................................................................................
8.6.7
436
You Cannot Throw or Catch Instances of a Generic Class ...
8.6.8
437
You Can Defeat Checked Exception Checking .....................
8.6.9
439
Beware of Clashes after Erasure ..............................................
8.6.10
440
Inheritance Rules for Generic Types .....................................................
8.7
442
Wildcard Types ........................................................................................
8.8
442
The Wildcard Concept ..............................................................
8.8.1
444
Supertype Bounds for Wildcards ............................................
8.8.2
447
Unbounded Wildcards .............................................................
8.8.3
448
Wildcard Capture ......................................................................
8.8.4
450
Reflection and Generics ..........................................................................
8.9
450
The Generic
Class
Class ..............................................................
8.9.1
452
Using
Class
Parameters for Type Matching ........................
8.9.2
452
Generic Type Information in the Virtual Machine ................
8.9.3
Do'stlaringiz bilan baham: