node.setJavaClass(forClass);
try {
// set the actual array size for further use by ArrayTypeHelper
node.setAttributes(attributes.getCorbaArrayLength()[0]);
} catch (ArrayIndexOutOfBoundsException e) {
RequestConfigurationException exc =
new RequestConfigurationException("Annotated array size doesn't match declared arrays size");
throw exc;
}
} else if (primitives.contains(forClass)) {
node.setNodeType(NodeType.primitive);
node.setJavaClass(forClass);
node.setChildren(null);
} else if (forClass.isInterface()) {
node.setNodeType(NodeType.reference);
node.setJavaClass(forClass);
node.setChildren(null);
} else if (isStructType(forClass)) {
node.setNodeType(NodeType.struct);
node.setJavaClass(forClass);
} else if (isEnumType(forClass)) {
node.setNodeType(NodeType.idl_enum);
node.setJavaClass(forClass);
} else if (isUserException(forClass)) {
node.setNodeType(NodeType.exception);
node.setJavaClass(forClass);
} else if (isUnionType(forClass)) {
node.setNodeType(NodeType.union);
node.setJavaClass(forClass);
node.setAttributes(getUnionAttributes(forClass));
} else {
RequestConfigurationException e =
new RequestConfigurationException("User defined type which cannot be handled: " + forClass
.getCanonicalName());
throw e;
}
return node;
}