public interface Aspect
The Wake project contains a full-featured implementation of this API that may serve as a useful example.
|Modifier and Type||Method and Description|
This method creates a child aspect, and returns it.
Inject an object of type T.
TANG calls this the first time get() is called on an injection future.
<T> T inject(ConstructorDef<T> def, Constructor<T> constructor, Object args) throws InvocationTargetException, IllegalAccessException, IllegalArgumentException, InstantiationException
Note that it is never OK to return an instance of ExternalConstructor. Typical implementations check to see if they are about to return an instance of ExternalConstructor. If so, they return ret.newInstance() instead. It throws a number of exceptions which are passed-through from the wrapped call to newInstance().
def- information about the constructor to be invoked. This is mostly useful because it contains references to any relevant named parameters, and to the class to be injected.
constructor- The java constructor to be injected. Tang automatically chooses the appropriate constructor and ensures that we have permission to invoke it.
args- The parameters to be passed into constructor.newInstance(), in the correct order.
<T> void injectionFutureInstantiated(InjectionFuture<T> f, T t)
f- An InjectionFuture that was passed to the args array of inject at some point in the past.
t- An object instance that was returned by inject().
Copyright © 2017 The Apache Software Foundation. All rights reserved.