I think you need getGroup(java.lang.String msg, int field)
, where field is the tag for the group's counter field.
That will give you a DataDictionary.GroupInfo
object, and on that you can call getDataDictionary().isRequiredField(msgType,field)
(use the same message type).
I think that'll work, anyway. The docs aren't explicitly clear on this.
But why are you doing this?
To be honest, I'm not sure why you think you need to do this. There's simply no need to dynamically query which fields are required. When receiving, the engine checks the required/not-required for you. When you're sending, you have to set values to all the required fields anyway (you can't dynamically do that!).
Unless you are writing some kind of DD-analysis tool, I think you're spending your time investigating a red herring.