/** * When we are using typed Javascript names we sometimes want to get a * specially named converter * @param paramType The class that we are converting to * @param javascriptClassName The type name as passed in from the client * @return The Converter that matches this request (if any) * @throws ConversionException If marshalling fails */ protected NamedConverter getNamedConverter(String javascriptClassName, Class<?> paramType) throws ConversionException { NamedConverter namedConv = getNamedConverter(javascriptClassName); if (namedConv != null) { if (paramType.isAssignableFrom(namedConv.getInstanceType())) { return namedConv; } } return null; }
public Class<?> getClientDeclaredType(InboundVariable data) { if (data == null) { return null; } String objectName = data.getNamedObjectType(); if (objectName != null) { NamedConverter converter = getNamedConverter(objectName, Object.class); if (converter != null) { return converter.getInstanceType(); } else { return null; } } // TODO: we do know the type that the client sent - we might be able // to do something better here. return null; }
Map<String, Property> properties = namedConv.getPropertyMapFromClass(namedConv.getInstanceType(), true, true); for (Entry<String, Property> entry : properties.entrySet())