Last active
December 17, 2015 15:59
-
-
Save stijnvanbael/5635361 to your computer and use it in GitHub Desktop.
Sealed class hierarchy "interface"
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 abstract class SealedServices { | |
Services() { | |
// Default scoped constructor prevents extension by client | |
} | |
public abstract FooService getFooService(); | |
public abstract BarService getBarService(); | |
abstract void validate(); // method we don’t want the client to call | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment