class ManifestProvider implements Function<Object, String> {

    @Override
    public String apply(final Object o) {
        checkNotNull(o, "object");
        final Class<?> oClass = o.getClass();
        if (WithManifest.class.isAssignableFrom(oClass)) {
            final WithManifest withManifest = (WithManifest) o;
            return withManifest.getManifest();
        }
        // Important: use the simple name without package!
        return oClass.getSimpleName();
    }

    private  ManifestProvider();

}