* Copyright (c) OSGi Alliance (2008, 2010). All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
Java 5 and later support generic types. These types consist of a raw class
with type parameters. This class models such a
Type class but
ensures that the type is reified. Reification means that the Type
graph associated with a Java 5
Type instance is traversed until
the type becomes a concrete class. This class is available with the
method. The optional type parameters are recursively
represented as Reified Types.
In Java 1.4, a class has by definition no type parameters. This class
implementation provides the Reified Type for Java 1.4 by making the raw class
the Java 1.4 class and using a Reified Type based on the
class for any requested type parameter.
A Blueprint extender implementations can subclass this class and provide
access to the generic type parameter graph for conversion. Such a subclass
must reify the different Java 5
Type instances into the
reified form. That is, a form where the raw Class is available with its
optional type parameters as Reified Types.
Map<String, ? extends Metadata>The raw class is the Map class.
i. For example, in the following example:
Map<String, ? extends Metadata>type parameter 0 is
String, and type parameter 1 is
This implementation returns a Reified Type that has
as class. Any object is assignable to Object and therefore no conversion
is then necessary. This is compatible with versions of Java language
prior to Java 5.
This method should be overridden by a subclass that provides access to
the generic type parameter information for Java 5 and later.
iThe zero-based index of the requested type parameter.
ReifiedTypefor the generic type parameter at the specified index.