public abstract class DependencyInjectionBinder<T> extends ActEvent implements javax.inject.Provider<T>, SystemEvent
Used to pass class binding resolution to DI plugin(s)
SOURCE_PLACEHODER
Constructor and Description |
---|
DependencyInjectionBinder(java.lang.Object source,
java.lang.Class<T> targetClass) |
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
eventType()
Unlike the
Object.getClass() method, which always return the java class of the current instance. |
T |
get() |
abstract T |
resolve(App app) |
java.lang.Class<T> |
targetClass() |
public DependencyInjectionBinder(java.lang.Object source, java.lang.Class<T> targetClass)
public java.lang.Class eventType()
ActEvent
Unlike the Object.getClass()
method, which always return the java class of the current instance. This eventType()
method allow a certain implementation of the class terminate the return value of the method. For example, suppose you have a event class MyEvent
and you might have some anonymous class of MyEvent
. If you implement the eventType()
of MyEvent
class as follows:
public class<MyEvent> eventType() { return MyEvent.class; }Then all the anonymous sub class will return the
MyEvent.class
instead of their own class. This allows the ActFramework properly handle the event class registration
public java.lang.Class<T> targetClass()
Copyright © 2014–2017 ActFramework. All rights reserved.