com.sun.hk2.component
Class ConstructorCreator<T>

java.lang.Object
  extended by org.glassfish.hk2.utilities.DescriptorImpl
      extended by com.sun.hk2.component.AbstractInhabitantImpl<T>
          extended by com.sun.hk2.component.AbstractCreatorImpl<T>
              extended by com.sun.hk2.component.ConstructorCreator<T>
All Implemented Interfaces:
Holder<T>, Serializable, Descriptor, Binding<T>, Factory<T>, ManagedComponentProvider<T>, Provider<T>, Releasable, Creator<T>, Inhabitant<T>

Deprecated.

@Deprecated
public class ConstructorCreator<T>
extends AbstractCreatorImpl<T>

Creates an object from its constructor.

Author:
Kohsuke Kawaguchi
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sun.hk2.component.Holder
Holder.Impl<T>
 
Field Summary
 
Fields inherited from class com.sun.hk2.component.AbstractCreatorImpl
serviceLocator, type
 
Fields inherited from class com.sun.hk2.component.AbstractInhabitantImpl
descriptor
 
Constructor Summary
ConstructorCreator(Class<? extends T> type, ServiceLocator habitat, Map<String,List<String>> metadata)
          Deprecated.  
 
Method Summary
 T create(Inhabitant onBehalfOf)
          Deprecated. Creates a new instance.
 void initialize(T t, Inhabitant onBehalfOf)
          Deprecated. Performs initialization of object, such as dependency injection.
 
Methods inherited from class com.sun.hk2.component.AbstractCreatorImpl
get, getInjectionResolvers, inject, isActive, metadata, release, type, typeName
 
Methods inherited from class com.sun.hk2.component.AbstractInhabitantImpl
companions, dispose, get, getAnnotation, getAnnotation, getAnnotations, getByType, getDescriptor, getDescriptorFor, getProvider, getProvider, getSerializedMetadata, getSerializedMetadata, lead, matches, setCompanions, toString
 
Methods inherited from class org.glassfish.hk2.utilities.DescriptorImpl
addAdvertisedContract, addMetadata, addQualifier, equals, getAdvertisedContracts, getBaseDescriptor, getDescriptorType, getImplementation, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, hashCode, pretty, readObject, removeAdvertisedContract, removeAllMetadata, removeMetadata, removeQualifier, setBaseDescriptor, setDescriptorType, setImplementation, setLoader, setLocatorId, setName, setRanking, setScope, setServiceId, writeObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jvnet.hk2.component.Creator
get
 
Methods inherited from interface org.jvnet.hk2.component.Inhabitant
companions, getSerializedMetadata, getSerializedMetadata, lead, setCompanions
 
Methods inherited from interface org.glassfish.hk2.Binding
getDescriptor, getProvider, getProvider
 
Methods inherited from interface org.glassfish.hk2.Provider
getAnnotations, getByType
 
Methods inherited from interface org.glassfish.hk2.api.Descriptor
getAdvertisedContracts, getBaseDescriptor, getDescriptorType, getImplementation, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, setRanking
 

Constructor Detail

ConstructorCreator

public ConstructorCreator(Class<? extends T> type,
                          ServiceLocator habitat,
                          Map<String,List<String>> metadata)
Deprecated. 
Method Detail

create

public T create(Inhabitant onBehalfOf)
         throws ComponentException
Deprecated. 
Description copied from interface: Creator
Creates a new instance. The caller is supposed to call the Creator.initialize(Object, Inhabitant) right away. This 2-phase initialization allows us to handle cycle references correctly.

Throws:
ComponentException

initialize

public void initialize(T t,
                       Inhabitant onBehalfOf)
                throws ComponentException
Deprecated. 
Description copied from interface: Creator
Performs initialization of object, such as dependency injection.

Specified by:
initialize in interface Creator<T>
Overrides:
initialize in class AbstractCreatorImpl<T>
Throws:
ComponentException


Copyright © 2013 Oracle Corporation. All Rights Reserved.