Add prototype_in_device flag to configs and implement it in java generator