Class MarshallerInspector

    • Constructor Detail

      • MarshallerInspector

        public MarshallerInspector​(Class<?> clazz)
        Create an inspector for the given class.
        Parameters:
        clazz - The class to analyse and instantiate.
    • Method Detail

      • getInstance

        public <T> T getInstance​(RenderingContext ctx)
        Create an instance of this marshaller. Depending on the instantiation mode, get the current singleton instance, get a thread local one or create a new one.
        Parameters:
        ctx - The RenderingContext to inject, if null create an empty context.
        Returns:
        An instance of this class.
        Since:
        7.2
      • getNewInstance

        public Object getNewInstance​(RenderingContext ctx,
                                     boolean singleton)
        Create a new instance of the marshaller. It injects the required services if the marshaller is not a singleton. If it's a singleton, it prepares the context variables to handle thread localized context. Then it injects the given ctx.
        Parameters:
        ctx - The RenderingContext to inject.
        Returns:
        An instance of the marshaller.
        Since:
        7.2
      • injectCtx

        public void injectCtx​(Object instance,
                              RenderingContext ctx,
                              boolean singleton)
        Inject the context.
      • injectServices

        public void injectServices​(Object instance)
        Inject the services.
      • getPriority

        public Integer getPriority()
      • getSupports

        public List<javax.ws.rs.core.MediaType> getSupports()
      • getMarshalledType

        public Class<?> getMarshalledType()
      • getGenericType

        public Type getGenericType()
      • isMarshaller

        public boolean isMarshaller()
      • isWriter

        public boolean isWriter()
      • isReader

        public boolean isReader()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object