org.jboss.webbeans
Class Resolver

java.lang.Object
  extended by org.jboss.webbeans.Resolver
All Implemented Interfaces:
java.io.Serializable

public class Resolver
extends java.lang.Object
implements java.io.Serializable

Implementation of Web Beans type safe and name based bean resolution

Author:
Pete Muir
See Also:
Serialized Form

Constructor Summary
Resolver(ManagerImpl manager)
          Constructor
 
Method Summary
 void addInjectionPoints(java.util.Collection<AnnotatedItem<?,?>> elements)
          Add multiple injection points for later resolving using #registerInjectionPoint(AnnotatedItem).
 void clear()
          Reset all cached injection points.
<T,S> java.util.Set<Bean<T>>
get(AnnotatedItem<T,S> key)
          Get the possible beans for the given element
 java.util.Set<Bean<?>> get(java.lang.String name)
          Get the possible beans for the given name
 java.util.List<Decorator> resolveDecorators(java.util.Set<java.lang.Class<?>> types, java.lang.annotation.Annotation[] bindingTypes)
          Resolves decorators according to binding criteria
 void resolveInjectionPoints()
          Resolve all injection points added using addInjectionPoints(Collection)
 java.util.List<Interceptor> resolveInterceptors(InterceptionType type, java.lang.annotation.Annotation[] interceptorBindings)
          Resolves interceptors according to binding criteria
 java.lang.String toString()
          Gets a string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resolver

public Resolver(ManagerImpl manager)
Constructor

Parameters:
manager - The Web Beans manager
Method Detail

addInjectionPoints

public void addInjectionPoints(java.util.Collection<AnnotatedItem<?,?>> elements)
Add multiple injection points for later resolving using #registerInjectionPoint(AnnotatedItem). Useful during bootstrap.

Parameters:
elements - The injection points to add

clear

public void clear()
Reset all cached injection points. You must reset all cached injection points when you add a bean to the manager


resolveInjectionPoints

public void resolveInjectionPoints()
Resolve all injection points added using addInjectionPoints(Collection)


get

public <T,S> java.util.Set<Bean<T>> get(AnnotatedItem<T,S> key)
Get the possible beans for the given element

Parameters:
key - The resolving criteria
Returns:
An unmodifiable set of matching beans

get

public java.util.Set<Bean<?>> get(java.lang.String name)
Get the possible beans for the given name

Parameters:
name - The name to match
Returns:
The set of matching beans

resolveDecorators

public java.util.List<Decorator> resolveDecorators(java.util.Set<java.lang.Class<?>> types,
                                                   java.lang.annotation.Annotation[] bindingTypes)
Resolves decorators according to binding criteria

Parameters:
types - The set of API types to match
bindingTypes - The binding types to match
Returns:
The set of matching decorators

resolveInterceptors

public java.util.List<Interceptor> resolveInterceptors(InterceptionType type,
                                                       java.lang.annotation.Annotation[] interceptorBindings)
Resolves interceptors according to binding criteria

Parameters:
types - The set of API types to match
bindingTypes - The binding types to match
Returns:
The set of matching interceptors

toString

public java.lang.String toString()
Gets a string representation

Overrides:
toString in class java.lang.Object
Returns:
A string representation


Copyright © 2008. All Rights Reserved.