Class JsonbContext


  • public class JsonbContext
    extends Object
    Jsonb context holding central components and configuration of jsonb runtime. Scoped to instance of Jsonb runtime. Thread bound.
    Author:
    Roman Grigoriadi
    • Constructor Detail

      • JsonbContext

        public JsonbContext​(javax.json.bind.JsonbConfig jsonbConfig,
                            javax.json.spi.JsonProvider jsonProvider)
        Creates and initialize context.
        Parameters:
        jsonbConfig - jsonb jsonbConfig not null
        jsonProvider - provider of JSONP
    • Method Detail

      • getConfig

        public javax.json.bind.JsonbConfig getConfig()
        Gets JsonbConfig.
        Returns:
        Configuration.
      • getMappingContext

        public MappingContext getMappingContext()
        Gets mapping context.
        Returns:
        Mapping context.
      • getJsonProvider

        public javax.json.spi.JsonProvider getJsonProvider()
        Gets JSONP provider.
        Returns:
        JSONP provider.
      • getComponentInstanceCreator

        public JsonbComponentInstanceCreator getComponentInstanceCreator()
        Implementation creating instances of user components used by JSONB, such as adapters and strategies.
        Returns:
        Instance creator.
      • getComponentMatcher

        public ComponentMatcher getComponentMatcher()
        Component matcher for lookup of (de)serializers and adapters.
        Returns:
        Component matcher.
      • getAnnotationIntrospector

        public AnnotationIntrospector getAnnotationIntrospector()
        Gets component for annotation parsing.
        Returns:
        Annotation introspector.
      • genericComponentsPresent

        public boolean genericComponentsPresent()
        Flag for searching for generic serializers and adapters in runtime.
        Returns:
        True if generic components are present.
      • registerGenericComponentFlag

        public void registerGenericComponentFlag()
        Set flag for searching for generic serializers and adapters in runtime.
      • addProcessedObject

        public boolean addProcessedObject​(Object object)
      • removeProcessedObject

        public boolean removeProcessedObject​(Object object)