New Features of UML2
|
Long Talk | Copyright © IBM Corp., 2007-2008.
All rights reserved.
14
Generics: Examples - Wildcards
•
In Java, wildcards are represented by
?
which stands for an
unknown type.
•
•
When we talk about bounds we refer to the ability to specify that
bindings must either be the
super
type of some classifier or
extend
some classifier.
public
class
MyClass3Impl
extends
EObjectImpl
implements
MyClass3
{
protected
List<?
extends
Car>
someReference;
protected
List<?
super
Car>
anotherReference;
}