samples/genericconstructor/src-generics/org/apidesign/template/Template.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 21:30:10 +0100
changeset 409 40cabcdcd2be
permissions -rw-r--r--
Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
     1 package org.apidesign.template;
     2 
     3 // BEGIN: generics.constructor.template2
     4 public final class Template<T> extends Object {
     5     private final Class<T> type;
     6 
     7     public Template(Class<T> type) { this.type = type; }
     8     public Class<T> getType() { return type; }
     9 
    10     // now what!?
    11     public Template() { this(Object.class); }
    12 } 
    13 // END: generics.constructor.template2