| Modifier and Type | Field and Description |
|---|---|
| private final ActiveDescriptor | |
| private final Descriptor | |
| private T | |
| private final ReentrantLock | |
| private boolean | |
| private volatile boolean | |
| private Set | |
| private Creator | |
| private Long | |
| private Long | |
| private final Long | |
| private Class | |
| private Type | |
| private final List | |
| private final ReentrantLock | |
| private final Set | |
| private final Condition | |
| private boolean | |
| private Set | |
| private volatile boolean | |
| private boolean | |
| private Class | |
| private Annotation | |
| private final ServiceLocatorImpl | |
| private int | |
| private final HashMap |
| Access | Constructor and Description |
|---|---|
| pack-priv | SystemDescriptor(Descriptor baseDescriptor, boolean requiresDeepCopy, ServiceLocatorImpl locator, Long serviceId)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| private void | |
| public boolean | |
| public T | create(ServiceHandle<?> root)
Implements org. Creates an instance of the ActiveDescriptor. |
| public void | dispose(T instance)
Implements org. Disposes this instance. |
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public Set | getAdvertisedContracts()
Implements org. Returns the base class name of the contracts that this service describes. |
| public T | getCache()
Implements org. This can be used for scopes that will only every be created once. |
| public String | getClassAnalysisName()
Implements org. Returns the name of the |
| public Set | getContractTypes()
Implements org. The set of types that this ActiveDescriptor must produce. |
| public DescriptorType | getDescriptorType()
Implements org. Returns CLASS if this is a class descriptor and FACTORY if this is a descriptor describing a factory for a type, in which case the implClass should point to the implementation class of the factory |
| public DescriptorVisibility | getDescriptorVisibility()
Implements org. Returns the visibility of this descriptor. |
| private ActiveDescriptor | getFactoryDescriptor(Method provideMethod, Type factoryProvidedType, ServiceLocatorImpl locator, Collector collector)
|
| public Long | getFactoryLocatorId()
Implements org. If this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service. |
| public Long | getFactoryServiceId()
Implements org. If this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service. |
| public String | getImplementation()
Implements org. Returns the fully qualified class name of the implementation class. |
| public Class | getImplementationClass()
Implements org. The implementation class that should be used to generate new instances of this descriptor. |
| public Type | getImplementationType()
Implements org. If known the Type of the implementation. |
| public List | getInjectees()
Implements org. Returns the full list of Injectees this class has. |
| public HK2Loader | getLoader()
Implements org. This returns the loader that should be used when classloading this descriptor. |
| public Long | getLocatorId()
Implements org. This returns the id of the ServiceLocator which this descriptor is registered with. |
| public Map | getMetadata()
Implements org. Returns all of the metadata associated that this object should be registered with or looked up by |
| public String | |
| pack-priv Class | |
| public Set | getQualifierAnnotations()
Implements org. The full set of qualifiers that this ActiveDescriptor provides |
| public Set | getQualifiers()
Implements org. Returns all of the annotation classes that this object should be registered with or looked up by |
| public int | getRanking()
Implements org. Returns the ranking of this descriptor. |
| public String | getScope()
Implements org. Returns the fully qualified class name of the scope annotation that should be associated with this descriptor. |
| public Class | getScopeAnnotation()
Implements org. Returns the scope that this ActiveDescriptor belongs to |
| public Annotation | getScopeAsAnnotation()
Implements org. Returns the scope as an |
| public Long | getServiceId()
Implements org. This returns the unique identifier for this descriptor. |
| pack-priv int | |
| public int | |
| private void | internalReify(Class<?>
The impl class to reify implClass, Collector An error collector for errors collector)The service locator must hold its lock for this cal |
| pack-priv void | |
| public boolean | isCacheSet()
Implements org. Returns true if this cache has been set |
| public boolean | isClosed()
Implements org. Returns true if the instance has been closed |
| public Boolean | isProxiable()
Implements org. If this returns true then the system will create a proxy for instances of this descriptor. |
| public Boolean | isProxyForSameScope()
Implements org. This value determines whether or not this service should be proxied when being injected into other services of the same scope. |
| public boolean | isReified()
Implements org. This method returns true if this descriptor has been reified (class loaded). |
| pack-priv boolean | Returns: true if this validation service should validate this descriptorThe service to get the isValidating decision from service)Gets the decision of the filter from this service. |
| pack-priv void | |
| public void | releaseCache()
Implements org. Removes the cached value and makes it such that this cache has not been set |
| pack-priv void | |
| pack-priv void | |
| public void | setCache(T cacheMe)
Implements org. Sets the value into the cache |
| pack-priv void | |
| public int | setRanking(int ranking)
Implements org. Returns the ranking of this descriptor. |
| pack-priv int | |
| pack-priv void | |
| public String |
| activeDescriptor | back to summary |
|---|---|
| private final ActiveDescriptor<T> activeDescriptor | |
| baseDescriptor | back to summary |
|---|---|
| private final Descriptor baseDescriptor | |
| cachedValue | back to summary |
|---|---|
| private T cachedValue | |
| cacheLock | back to summary |
|---|---|
| private final ReentrantLock cacheLock | |
| cacheSet | back to summary |
|---|---|
| private boolean cacheSet | |
| closed | back to summary |
|---|---|
| private volatile boolean closed | |
| contracts | back to summary |
|---|---|
| private Set<Type> contracts | |
| creator | back to summary |
|---|---|
| private Creator<T> creator | |
| factoryLocatorId | back to summary |
|---|---|
| private Long factoryLocatorId | |
| factoryServiceId | back to summary |
|---|---|
| private Long factoryServiceId | |
| id | back to summary |
|---|---|
| private final Long id | |
| implClass | back to summary |
|---|---|
| private Class<?> implClass | |
| implType | back to summary |
|---|---|
| private Type implType | |
| instanceListeners | back to summary |
|---|---|
| private final List<InstanceLifecycleListener> instanceListeners | |
| lock | back to summary |
|---|---|
| private final ReentrantLock lock | |
| myLists | back to summary |
|---|---|
| private final Set<IndexedListData> myLists | |
| notReifyingCondition | back to summary |
|---|---|
| private final Condition notReifyingCondition | |
| preAnalyzed | back to summary |
|---|---|
| private boolean preAnalyzed | |
| qualifiers | back to summary |
|---|---|
| private Set<Annotation> qualifiers | |
| reified | back to summary |
|---|---|
| private volatile boolean reified | |
| reifying | back to summary |
|---|---|
| private boolean reifying | |
| scope | back to summary |
|---|---|
| private Class<? extends Annotation> scope | |
| scopeAnnotation | back to summary |
|---|---|
| private Annotation scopeAnnotation | |
| sdLocator | back to summary |
|---|---|
| private final ServiceLocatorImpl sdLocator | |
| singletonGeneration | back to summary |
|---|---|
| private int singletonGeneration | |
| validationServiceCache | back to summary |
|---|---|
| private final HashMap<ValidationService, Boolean> validationServiceCache | |
| SystemDescriptor | back to summary |
|---|---|
pack-priv SystemDescriptor(Descriptor baseDescriptor, boolean requiresDeepCopy, ServiceLocatorImpl locator, Long serviceId)
| |
| addList | back to summary |
|---|---|
| pack-priv void addList(IndexedListData indexedList) | |
| checkState | back to summary |
|---|---|
| private void checkState() | |
| close | back to summary |
|---|---|
| public boolean close() Implements org. Doc from org. Idempotent close method. Returns true if the instance had already been closed
| |
| create | back to summary |
|---|---|
| public T create(ServiceHandle<?> root) Implements org. Doc from org. Creates an instance of the ActiveDescriptor. All of the Injectee's must be created prior to instantiation, and associated with the ExtendedProvider so that they can be destroyed properly
| |
| dispose | back to summary |
|---|---|
| public void dispose(T instance) Implements org. Doc from org. Disposes this instance. All the PerLookup objects that were created for this instance will be destroyed after this object has been destroyed
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getAdvertisedContracts | back to summary |
|---|---|
| public Set Implements org. Doc from org. Returns the base class name of the contracts that this service describes. If the contract is a paramterized type this will return the raw class. If this service can be looked up by its implementation class then the name of the implementation class must also be found in this list
| |
| getCache | back to summary |
|---|---|
| public T getCache() Implements org. Doc from org. This can be used for scopes that will only every be created once. The returned value must have been set previously with setCache. If this is called when isCacheSet is false will result in a RuntimeException
| |
| getClassAnalysisName | back to summary |
|---|---|
| public String getClassAnalysisName() Implements org. Doc from org. Returns the name of the
| |
| getContractTypes | back to summary |
|---|---|
| public Set Implements org. Doc from org. The set of types that this ActiveDescriptor must produce. These types may be Classes or ParameterizedTypes, and may be no other subclass of Type
| |
| getDescriptorType | back to summary |
|---|---|
| public DescriptorType getDescriptorType() Implements org. Doc from org. Returns CLASS if this is a class descriptor and FACTORY if this is a descriptor describing a factory for a type, in which case the implClass should point to the implementation class of the factory
| |
| getDescriptorVisibility | back to summary |
|---|---|
| public DescriptorVisibility getDescriptorVisibility() Implements org. Doc from org. Returns the visibility of this descriptor. If the visibility is NORMAL then this descriptor may be seen by all children locators of the locator in which this descriptor is bound If the visibility is LOCAL then this descriptor may only be seen by the servcie locator in which it is bound, and in none of the children of that locator
| |
| getFactoryDescriptor | back to summary |
|---|---|
| private ActiveDescriptor | |
| getFactoryLocatorId | back to summary |
|---|---|
| public Long getFactoryLocatorId() Implements org. Doc from org. If this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service. Otherwise this method should return null
| |
| getFactoryServiceId | back to summary |
|---|---|
| public Long getFactoryServiceId() Implements org. Doc from org. If this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service. Otherwise this method should return null
| |
| getImplementation | back to summary |
|---|---|
| public String getImplementation() Implements org. Doc from org. Returns the fully qualified class name of the implementation class. If this is a factory descriptor then this will return the fully qualified name of the class implementing the factory interface.
| |
| getImplementationClass | back to summary |
|---|---|
| public Class Implements org. Doc from org. The implementation class that should be used to generate new instances of this descriptor. If the class returned is a Factory, then the factory is used to create instances. In this case the system will get an instance of the factory and use it to create the instances
| |
| getImplementationType | back to summary |
|---|---|
| public Type getImplementationType() Implements org. Doc from org. If known the Type of the implementation. If unknown will
return the same as
| |
| getInjectees | back to summary |
|---|---|
| public List Implements org. Doc from org. Returns the full list of Injectees this class has. These references will be resolved prior to the class being constructed, even if these injectees are field or method injectees. If this descriptor is describing a factory created type then this list must have zero length
| |
| getLoader | back to summary |
|---|---|
| public HK2Loader getLoader() Implements org. Doc from org. This returns the loader that should be used when classloading this descriptor. If this method returns null then the class will be loaded with the classloader of the Injectee if there is one, or with the classloader that loaded HK2 itself; failing that the context class loader on the thread will be tried.
| |
| getLocatorId | back to summary |
|---|---|
| public Long getLocatorId() Implements org. Doc from org. This returns the id of the ServiceLocator which this descriptor is registered with. Returns null if this descriptor is not yet registered with a ServiceLocator
| |
| getMetadata | back to summary |
|---|---|
| public Map Implements org. Doc from org. Returns all of the metadata associated that this object should be registered with or looked up by
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. The name of this descriptor. Note that if this returns not null then there must also be the Named qualifier in the set of qualifiers with the same value
| |
| getPreAnalyzedClass | back to summary |
|---|---|
| pack-priv Class | |
| getQualifierAnnotations | back to summary |
|---|---|
| public Set Implements org. Doc from org. The full set of qualifiers that this ActiveDescriptor provides
| |
| getQualifiers | back to summary |
|---|---|
| public Set Implements org. Doc from org. Returns all of the annotation classes that this object should be registered with or looked up by
| |
| getRanking | back to summary |
|---|---|
| public int getRanking() Implements org. Doc from org. Returns the ranking of this descriptor. Rankings with higher value will be considered "better" than rankings of lower value. Descriptors with the same ranking will be returned in the reverse ServiceID order (in other words, the least service ID is considered "better" than any higher service ID).
| |
| getScope | back to summary |
|---|---|
| public String getScope() Implements org. Doc from org. Returns the fully qualified class name of the scope annotation that should be associated with this descriptor.
| |
| getScopeAnnotation | back to summary |
|---|---|
| public Class Implements org. Doc from org. Returns the scope that this ActiveDescriptor belongs to
| |
| getScopeAsAnnotation | back to summary |
|---|---|
| public Annotation getScopeAsAnnotation() Implements org. Doc from org. Returns the scope as an
| |
| getServiceId | back to summary |
|---|---|
| public Long getServiceId() Implements org. Doc from org. This returns the unique identifier for this descriptor. This field will be ignored upon binding, and will then be assigned by the system. However, this field can be set on search operations, in which case this search will match exactly one Provider in the system.
| |
| getSingletonGeneration | back to summary |
|---|---|
| pack-priv int getSingletonGeneration() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| internalReify | back to summary |
|---|---|
| private void internalReify(Class<?> implClass, Collector collector) The service locator must hold its lock for this cal | |
| invokeInstanceListeners | back to summary |
|---|---|
| pack-priv void invokeInstanceListeners(InstanceLifecycleEvent event) | |
| isCacheSet | back to summary |
|---|---|
| public boolean isCacheSet() Implements org. Doc from org. Returns true if this cache has been set
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Implements org. Doc from org. Returns true if the instance has been closed
| |
| isProxiable | back to summary |
|---|---|
| public Boolean isProxiable() Implements org. Doc from org. If this returns true then the system will create a proxy for
instances of this descriptor. As with all proxies, the proxy
created will also implement the
It is an error for this method to return true if the scope that
this descriptor is in is
| |
| isProxyForSameScope | back to summary |
|---|---|
| public Boolean isProxyForSameScope() Implements org. Doc from org. This value determines whether or not this service should be proxied when being injected into other services of the same scope. If a scope is proxiable then it will have a default setting for whether or not its services should be proxied when being injected into the same scope. If this method returns null then the default setting for the scope will be used. Otherwise the value returned will determine whether or not this service will be proxied when being injected into a service of the same scope.
| |
| isReified | back to summary |
|---|---|
| public boolean isReified() Implements org. Doc from org. This method returns true if this descriptor has been reified (class loaded). If this method returns false then the other methods in this interface will throw an IllegalStateException. Once this method returns true it may be
| |
| isValidating | back to summary |
|---|---|
| pack-priv boolean isValidating(ValidationService service) Gets the decision of the filter from this service. May use a cache
| |
| reify | back to summary |
|---|---|
| pack-priv void reify(Class<?> implClass, Collector collector) | |
| releaseCache | back to summary |
|---|---|
| public void releaseCache() Implements org. Doc from org. Removes the cached value and makes it such that this cache has not been set
| |
| removeList | back to summary |
|---|---|
| pack-priv void removeList(IndexedListData indexedList) | |
| reupInstanceListeners | back to summary |
|---|---|
| pack-priv void reupInstanceListeners(List<InstanceLifecycleListener> listeners) | |
| setCache | back to summary |
|---|---|
| public void setCache(T cacheMe) Implements org. Doc from org. Sets the value into the cache
| |
| setFactoryIds | back to summary |
|---|---|
| pack-priv void setFactoryIds(Long factoryLocatorId, Long factoryServiceId) | |
| setRanking | back to summary |
|---|---|
| public int setRanking(int ranking) Implements org. Doc from org. Returns the ranking of this descriptor. Rankings with higher value will be considered "better" than rankings of lower value. Descriptors with the same ranking will be returned in the reverse ServiceID order (in other words, the least service ID is considered "better" than any higher service ID). The ranking of a service may change at any time during the life of the descriptor
| |
| setRankWithLock | back to summary |
|---|---|
| pack-priv int setRankWithLock(int ranking) | |
| setSingletonGeneration | back to summary |
|---|---|
| pack-priv void setSingletonGeneration(int gen) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |