String namespace = null;
String generator = null;
Class<? extends Annotation> enumAnnotation = null;
ClassTypeMap typeMap = new ClassTypeMap();
TypeMap annotationMap = new TypeMap();
TypeMap annotationTypeMap = new TypeMap();
for (String[] opt : options) {
if (opt[0].equals(PARAM_DESTINATION)) {
destination = opt[1];
} else if (opt[0].equals(PARAM_NAMESPACE)) {
namespace = opt[1];
} else if (opt[0].equals(PARAM_GENERATOR)) {
generator = opt[1];
} else if (opt[0].equals(PARAM_ENUM)) {
enumAnnotation = (Class<? extends Annotation>) Class.forName(opt[1]);
} else if (opt[0].equals(PARAM_MAP)) {
String[] strings = opt[1].split(":");
if (strings.length == 2) typeMap.addTypeMapping(strings[0], strings[1]);
} else if (opt[0].equals(PARAM_GENERIC_MAP)) {
String[] strings = opt[1].split(":");
if (strings.length == 2) typeMap.addGenericTypeMapping(strings[0], strings[1]);
} else if (opt[0].equals(PARAM_ANNOTATION_MAP)) {
String[] strings = opt[1].split(":");
if (strings.length == 2) annotationMap.addTypeMapping(strings[0], strings[1]);
} else if (opt[0].equals(PARAM_ANNOTATION_TYPE_MAP)) {
String[] strings = opt[1].split(":");
if (strings.length == 2) annotationTypeMap.addTypeMapping(strings[0], strings[1]);
}
}
if (Languages.ACTIONSCRIPT.equals(generator)) {
return new AsGenerator(destination, namespace, enumAnnotation, typeMap, annotationTypeMap, annotationMap);