author | Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
Thu, 30 Oct 2014 20:46:27 +0100 | |
changeset 408 | 9a439a79c6d0 |
permissions | -rw-r--r-- |
jtulach@142 | 1 |
package org.apidesign.template; |
jtulach@142 | 2 |
|
jtulach@142 | 3 |
// BEGIN: generics.constructor.template2 |
jtulach@142 | 4 |
public final class Template<T> extends Object { |
jtulach@142 | 5 |
private final Class<T> type; |
jtulach@142 | 6 |
|
jtulach@142 | 7 |
public Template(Class<T> type) { this.type = type; } |
jtulach@142 | 8 |
public Class<T> getType() { return type; } |
jtulach@142 | 9 |
|
jtulach@142 | 10 |
// now what!? |
jtulach@142 | 11 |
public Template() { this(Object.class); } |
jtulach@142 | 12 |
} |
jtulach@142 | 13 |
// END: generics.constructor.template2 |