void doSomethingElse();
}
@Concerns( { SomeOtherConcern.class, TraceAllConcern.class } )
@Mixins( MyMixin.class )
public interface MyComposite extends My, Composite
{
}
If we only want to trace the doSomethingElse() method in the above example, we do like this instead;
@Trace
void doSomethingElse();
}
@Concerns( { SomeOtherConcern.class, TraceConcern.class } )
@Mixins( MyMixin.class )
public interface MyComposite extends My, Composite
{
}
The Trace annotation can also take a "level" argument. It means that only if the TraceService traceLevel() property is set lower than or equal that of the "level" in the Trace annotation, there will be a trace record produced.
The TraceService interface is fairly simple;
void traceSuccess( Class compositeType, Composite object,
Method method, Object[] args,
Object result,
long entryTime, long durationNano );
void traceException( Class compositeType, Composite object,
Method method, Object[] args,
Throwable t,
long entryTime, long durationNano );
}