Class ComponentBag.ImmutableComponentBag

java.lang.Object
org.glassfish.jersey.model.internal.ComponentBag
org.glassfish.jersey.model.internal.ComponentBag.ImmutableComponentBag
Enclosing class:
ComponentBag

private static class ComponentBag.ImmutableComponentBag extends ComponentBag
Immutable version of ComponentBag.
  • Constructor Details

    • ImmutableComponentBag

      ImmutableComponentBag(ComponentBag original)
  • Method Details

    • register

      public boolean register(Class<?> componentClass, Inflector<ContractProvider.Builder,ContractProvider> modelEnhancer)
      Description copied from class: ComponentBag
      Register a component class using a given registration strategy.
      Overrides:
      register in class ComponentBag
      Parameters:
      componentClass - class to be introspected as a contract provider and registered, based on the registration strategy decision.
      modelEnhancer - custom contract provider model enhancer.
      Returns:
      true if the component registration was successful.
    • register

      public boolean register(Class<?> componentClass, int priority, Inflector<ContractProvider.Builder,ContractProvider> modelEnhancer)
      Description copied from class: ComponentBag
      Register a component class as a contract provider with an explicitly specified binding priority.
      Overrides:
      register in class ComponentBag
      Parameters:
      componentClass - class to be introspected as a contract provider and registered.
      priority - explicitly specified binding priority for the provider contracts implemented by the component.
      modelEnhancer - custom contract provider model enhancer.
      Returns:
      true if the component registration was successful.
    • register

      public boolean register(Class<?> componentClass, Set<Class<?>> contracts, Inflector<ContractProvider.Builder,ContractProvider> modelEnhancer)
      Description copied from class: ComponentBag
      Register a component class as a contract provider for the specified contracts.
      Overrides:
      register in class ComponentBag
      Parameters:
      componentClass - class to be introspected as a contract provider and registered.
      contracts - contracts to bind the component class to.
      modelEnhancer - custom contract provider model enhancer.
      Returns:
      true if the component registration was successful.
    • register

      public boolean register(Class<?> componentClass, Map<Class<?>,Integer> contracts, Inflector<ContractProvider.Builder,ContractProvider> modelEnhancer)
      Description copied from class: ComponentBag
      Register a component class as a contract provider for the specified contracts.
      Overrides:
      register in class ComponentBag
      Parameters:
      componentClass - class to be introspected as a contract provider and registered.
      contracts - contracts with their priorities to bind the component class to.
      modelEnhancer - custom contract provider model enhancer.
      Returns:
      true if the component registration was successful.
    • register

      public boolean register(Object component, Inflector<ContractProvider.Builder,ContractProvider> modelEnhancer)
      Description copied from class: ComponentBag
      Register a component using a given registration strategy.
      Overrides:
      register in class ComponentBag
      Parameters:
      component - instance to be introspected as a contract provider and registered, based on the registration strategy decision.
      modelEnhancer - custom contract provider model enhancer.
      Returns:
      true if the component registration was successful.
    • register

      public boolean register(Object component, int priority, Inflector<ContractProvider.Builder,ContractProvider> modelEnhancer)
      Description copied from class: ComponentBag
      Register a component as a contract provider with an explicitly specified binding priority.
      Overrides:
      register in class ComponentBag
      Parameters:
      component - instance to be introspected as a contract provider and registered, based on the registration strategy decision.
      priority - explicitly specified binding priority for the provider contracts implemented by the component.
      modelEnhancer - custom contract provider model enhancer.
      Returns:
      true if the component registration was successful.
    • register

      public boolean register(Object component, Set<Class<?>> contracts, Inflector<ContractProvider.Builder,ContractProvider> modelEnhancer)
      Description copied from class: ComponentBag
      Register a component as a contract provider for the specified contracts.
      Overrides:
      register in class ComponentBag
      Parameters:
      component - instance to be introspected as a contract provider and registered, based on the registration strategy decision.
      contracts - contracts to bind the component to.
      modelEnhancer - custom contract provider model enhancer.
      Returns:
      true if the component registration was successful.
    • register

      public boolean register(Object component, Map<Class<?>,Integer> contracts, Inflector<ContractProvider.Builder,ContractProvider> modelEnhancer)
      Description copied from class: ComponentBag
      Register a component as a contract provider for the specified contracts.
      Overrides:
      register in class ComponentBag
      Parameters:
      component - instance to be introspected as a contract provider and registered, based on the registration strategy decision.
      contracts - contracts with their priorities to bind the component to.
      modelEnhancer - custom contract provider model enhancer.
      Returns:
      true if the component registration was successful.
    • copy

      public ComponentBag copy()
      Description copied from class: ComponentBag
      Get a copy of this component bag.
      Overrides:
      copy in class ComponentBag
      Returns:
      component bag copy.
    • immutableCopy

      public ComponentBag immutableCopy()
      Description copied from class: ComponentBag
      Get immutable copy of a component bag.
      Overrides:
      immutableCopy in class ComponentBag
      Returns:
      immutable view of a component bag.
    • clear

      public void clear()
      Description copied from class: ComponentBag
      Removes all the component registrations and resets the component bag instance to a state as if it was create anew.
      Overrides:
      clear in class ComponentBag