public static String getConstValueByName(AST node, TypeMappingType typeMap) {
List<CorbaTypeImpl> types = typeMap.getStructOrExceptionOrUnion();
for (Iterator<CorbaTypeImpl> it = types.iterator(); it.hasNext();) {
CorbaTypeImpl corbaType = it.next();
if (corbaType instanceof Const) {
Const corbaConst = (Const) corbaType;
String name = corbaConst.getQName().getLocalPart();
if (name.endsWith(node.getText())) {
return corbaConst.getValue();
}
}
}
return null;
}