I am from Afghanistan and I have a refugee travel document issued in Japan. I have flight from Japan to Germany via Hong Kong, with a 7 hour layover in Hong Kong. Do I need a visa?
According to https://www.immd.gov.hk/eng/services/visas/visit-transit/visit-visa-entry-permit.html#notes you need a visa by virtue of your nationality, per the notes at the end of the visa requirements table. You might be able to transit with your travel document direct by air, providing you don’t leave the transit area, providing your document qualifies as a ‘stateless person travel document’, which is listed towards the end of the table.
As commented by @David, the visa requirements table isn’t entirely clear. I’d recommend you contact the Hong Kong Embassy in Japan for clarification.