Class ClazzCreator<T>

  • Type Parameters:
    T - The type of object this creator creates
    All Implemented Interfaces:
    Creator<T>

    public class ClazzCreator<T>
    extends java.lang.Object
    implements Creator<T>
    • Constructor Detail

      • ClazzCreator

        ClazzCreator​(ServiceLocatorImpl locator,
                     java.lang.Class<?> implClass)
    • Method Detail

      • resetSelfDescriptor

        void resetSelfDescriptor​(ActiveDescriptor<?> selfDescriptor)
        This is done because sometimes when creating the creator we do not know what the true system descriptor will be
        Parameters:
        selfDescriptor - The descriptor that should replace our self descriptor
      • createMe

        private java.lang.Object createMe​(java.util.Map<SystemInjecteeImpl,​java.lang.Object> resolved)
                                   throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • fieldMe

        private void fieldMe​(java.util.Map<SystemInjecteeImpl,​java.lang.Object> resolved,
                             T t)
                      throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • methodMe

        private void methodMe​(java.util.Map<SystemInjecteeImpl,​java.lang.Object> resolved,
                              T t)
                       throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • postConstructMe

        private void postConstructMe​(T t)
                              throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • preDestroyMe

        private void preDestroyMe​(T t)
                           throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • create

        public T create​(ServiceHandle<?> root,
                        SystemDescriptor<?> eventThrower)
        Description copied from interface: Creator
        Creates an instance of the given type
        Specified by:
        create in interface Creator<T>
        Returns:
        an instance of the given type
      • dispose

        public void dispose​(T instance)
        Description copied from interface: Creator
        Disposes the given instance
        Specified by:
        dispose in interface Creator<T>
        Parameters:
        instance - removes the given instance
      • getInjectees

        public java.util.List<Injectee> getInjectees()
        Description copied from interface: Creator
        Returns all the injectees needed prior to creating this object
        Specified by:
        getInjectees in interface Creator<T>
        Returns:
        a List of all the injectees
      • getImplClass

        java.lang.Class<?> getImplClass()
      • toString

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