API generator: android: Factory sample implementation - java part