Created
July 12, 2014 20:43
-
-
Save anna-is-cute/bdd57fef083ee9dbe4f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Bicycle { | |
// code | |
} | |
public class CoolBike extends Bicycle { | |
// code | |
} | |
public void doSomething(Class<? extends Bicycle> bikeClass) { | |
new Runnable() { | |
public Runnable(CoolBike cb) { // need this to be generic, but it can't just use Bicycle, it needs to specify CoolBike | |
// stuff | |
} | |
public void run() { | |
// more stuff | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment