Skip to content

Instantly share code, notes, and snippets.

View mdesoto's full-sized avatar

Michael De Soto mdesoto

View GitHub Profile
@mdesoto
mdesoto / gist:4070b9db2bf8a94abdba
Created February 18, 2016 22:33 — forked from konmik/gist:6ac725fa7134402539c4
Dagger 2 injection with inheritance
/**
* This class allows to inject into objects through a base class,
* so we don't have to repeat injection code everywhere.
*
* The performance drawback is about 0.013 ms per injection on a very slow device,
* which is negligible in most cases.
*
* Example:
* <pre>{@code