Java Code Examples for org.jboss.resteasy.spi.StringParameterUnmarshaller

The following examples show how to use org.jboss.resteasy.spi.StringParameterUnmarshaller. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
/**
 * Unregisters a @Provider type from this factory.
 */
public void removeRegistrations(final Class<?> type) {
  checkNotNull(type);

  log.debug("Removing registrations for: {}", type.getName());

  classContracts.remove(type);

  removeInstancesOf(type, providerInstances);
  providerClasses.remove(type);

  if (ExceptionMapper.class.isAssignableFrom(type)) {
    removeInstancesOf(type, exceptionMappers.values());
  }
  else if (MessageBodyReader.class.isAssignableFrom(type)) {
    clearInstancesOf(type, clientMessageBodyReaders, DUMMY_READER);
    clearInstancesOf(type, serverMessageBodyReaders, DUMMY_READER);
  }
  else if (MessageBodyWriter.class.isAssignableFrom(type)) {
    clearInstancesOf(type, clientMessageBodyWriters, DUMMY_WRITER);
    clearInstancesOf(type, serverMessageBodyWriters, DUMMY_WRITER);
  }
  else if (ContextResolver.class.isAssignableFrom(type)) {
    Type[] args = Types.getActualTypeArgumentsOfAnInterface(type, ContextResolver.class);
    contextResolvers.remove(Types.getRawType(args[0]));
  }
  else if (Feature.class.isAssignableFrom(type)) {
    removeInstancesOf(type, featureInstances);
    removeInstancesOf(type, enabledFeatures);
    featureClasses.remove(type);
  }
  else if (DynamicFeature.class.isAssignableFrom(type)) {
    removeInstancesOf(type, clientDynamicFeatures);
    removeInstancesOf(type, serverDynamicFeatures);
  }
  else if (ParamConverterProvider.class.isAssignableFrom(type)) {
    removeInstancesOf(type, paramConverterProviders);
  }
  else if (StringConverter.class.isAssignableFrom(type)) {
    removeInstancesOf(type, stringConverters.values());
  }
  else if (StringParameterUnmarshaller.class.isAssignableFrom(type)) {
    stringParameterUnmarshallers.values().remove(type);
  }
  else {
    log.warn("Unable to remove registrations for: {}", type.getName());
  }
}