Package org.jboss.weld.util.reflection
Class EventObjectTypeResolverBuilder
java.lang.Object
org.jboss.weld.util.reflection.EventObjectTypeResolverBuilder
Builds a special > event;
event.fire(new ArrayList());
The event object type is
We cannot simply infer the correct type (ArrayList) from the runtime type nor from the selected type. What this
special resolver does is that it combines the following type variable assignments:
L -> E
L -> String
and resolves E to String. The resolver is capable of doing it recursively for parameterized types.
TypeResolver capable of resolving type variables by using a combination of two type hierarchies.
The special resolver is only necessary for situations where the type of the event object contains an unresolved type variable
which cannot be resolved using the selected event type because the selected event type is a subtype of the event object.
For example:
private Event<ListArrayList (raw type due to type erasure) The selected type is List- Author:
- Jozef Hartinger
-
Constructor Summary
ConstructorsConstructorDescriptionEventObjectTypeResolverBuilder(Map<TypeVariable<?>, Type> selectedTypeVariables, Map<TypeVariable<?>, Type> eventTypeVariables) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Map<TypeVariable<?>,Type> protected voidprotected voidresolveTypeVariables(ParameterizedType type1, Type type2) protected voidresolveTypeVariables(Type type1, Type type2) protected voidresolveTypeVariables(TypeVariable<?> type1, Type type2)
-
Constructor Details
-
EventObjectTypeResolverBuilder
public EventObjectTypeResolverBuilder(Map<TypeVariable<?>, Type> selectedTypeVariables, Map<TypeVariable<?>, Type> eventTypeVariables)
-
-
Method Details
-
build
-
resolveTypeVariables
protected void resolveTypeVariables() -
resolveTypeVariables
-
resolveTypeVariables
-
resolveTypeVariables
-
getResolvedTypes
-