public class WakeProfiler extends Object implements Aspect
Constructor and Description |
---|
WakeProfiler() |
Modifier and Type | Method and Description |
---|---|
Aspect |
createChildAspect()
This method creates a child aspect, and returns it.
|
<T> T |
inject(ConstructorDef<T> constructorDef,
Constructor<T> constructor,
Object[] args)
Inject an object of type T.
|
<T> void |
injectionFutureInstantiated(InjectionFuture<T> arg0,
T arg1)
TANG calls this the first time get() is called on an injection future.
|
String |
objectGraphToString() |
public WakeProfiler()
public Aspect createChildAspect()
Aspect
createChildAspect
in interface Aspect
public <T> T inject(ConstructorDef<T> constructorDef, Constructor<T> constructor, Object[] args) throws InvocationTargetException, IllegalAccessException, IllegalArgumentException, InstantiationException
Aspect
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().
inject
in interface Aspect
constructorDef
- 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.InvocationTargetException
IllegalAccessException
IllegalArgumentException
InstantiationException
public <T> void injectionFutureInstantiated(InjectionFuture<T> arg0, T arg1)
Aspect
injectionFutureInstantiated
in interface Aspect
arg0
- An InjectionFuture that was passed to the args[] array of inject at some point in the past.arg1
- An object instance that was returned by inject().public String objectGraphToString()
Copyright © 2017 The Apache Software Foundation. All rights reserved.