Class MethodHandler.ClassBasedMethodHandler

    • Field Detail

      • handlerClass

        private final java.lang.Class<?> handlerClass
      • handlerConstructors

        private final java.util.List<HandlerConstructor> handlerConstructors
    • Constructor Detail

      • ClassBasedMethodHandler

        public ClassBasedMethodHandler​(java.lang.Class<?> handlerClass,
                                       java.util.Collection<Parameter> handlerParameters)
      • ClassBasedMethodHandler

        public ClassBasedMethodHandler​(java.lang.Class<?> handlerClass,
                                       boolean disableParamDecoding,
                                       java.util.Collection<Parameter> handlerParameters)
    • Method Detail

      • getHandlerClass

        public java.lang.Class<?> getHandlerClass()
        Description copied from class: MethodHandler
        Get the resource method handler class.
        Specified by:
        getHandlerClass in class MethodHandler
        Returns:
        resource method handler class.
      • getConstructors

        public java.util.List<HandlerConstructor> getConstructors()
        Description copied from class: MethodHandler
        Get the resource method handler constructors.

        The returned is empty by default. Concrete implementations may override the method to return the actual list of constructors that will be used for the handler initialization.

        Overrides:
        getConstructors in class MethodHandler
        Returns:
        resource method handler constructors.
      • getInstance

        public java.lang.Object getInstance​(InjectionManager injectionManager)
        Description copied from class: MethodHandler
        Get the injected resource method handler instance.
        Specified by:
        getInstance in class MethodHandler
        Parameters:
        injectionManager - injection manager that can be used to inject get the instance.
        Returns:
        injected resource method handler instance.
      • isClassBased

        public boolean isClassBased()
        Description copied from class: MethodHandler
        Return whether the method handler creates instances based on classes.
        Specified by:
        isClassBased in class MethodHandler
        Returns:
        True is instances returned by this method handler are created from classes given to InjectionManager, false otherwise (for example when method handler was initialized from instance)
      • getHandlerInstance

        protected java.lang.Object getHandlerInstance()
        Description copied from class: MethodHandler
        Get the raw handler instance that is backing this method handler.
        Specified by:
        getHandlerInstance in class MethodHandler
        Returns:
        raw handler instance. May return null if the handler is class-based.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object