private static UnionAttributes getUnionAttributes(Class<?> forClass) throws RequestConfigurationException {
UnionAttributes attributes = new UnionAttributes();
for (int i = 0; i < forClass.getDeclaredFields().length; i++) {
CorbaUnionElement note = forClass.getDeclaredFields()[i].getAnnotation(CorbaUnionElement.class);
if (note != null) {
if (note.type().equals(CorbaUnionElementType.discriminator)) {
attributes.setDiscriminatorName(forClass.getDeclaredFields()[i].getName());
} else if (note.type().equals(CorbaUnionElementType.defaultOption)) {
attributes.setDefaultOptionName(forClass.getDeclaredFields()[i].getName());
} else if (note.type().equals(CorbaUnionElementType.option)) {
if (attributes.getOptionsMapping().containsKey(note.optionNumber())) {