marshal = new JavaArrayMarshal<T>(argType);
}
else if (Map.class.isAssignableFrom(argType)) {
String typeName = argType.getName();
JavaClassDef javaDef = _moduleContext.getJavaClassDefinition(typeName);
marshal = new JavaMapMarshal(javaDef, isNotNull, isNullAsFalse);
}
else if (List.class.isAssignableFrom(argType)) {
String typeName = argType.getName();
JavaClassDef<List<?>> javaDef = (JavaClassDef<List<?>>)_moduleContext.getJavaClassDefinition(typeName);
marshal = new JavaListMarshal(javaDef, isNotNull, isNullAsFalse);
}
else if (Collection.class.isAssignableFrom(argType)) {
String typeName = argType.getName();
JavaClassDef<Collection<?>> javaDef = (JavaClassDef<Collection<?>>)_moduleContext.getJavaClassDefinition(typeName);
marshal = new JavaCollectionMarshal(javaDef, isNotNull, isNullAsFalse);
}
else if (Enum.class.isAssignableFrom(argType)) {
marshal = new EnumMarshal((Class<Enum<?>>)argType);
}
else {
String typeName = argType.getName();
JavaClassDef javaDef = _moduleContext.getJavaClassDefinition(typeName);
marshal = new JavaMarshal(javaDef, isNotNull, isNullAsFalse);
}
if (!isNullAsFalse)