Java 类org.aspectj.lang.reflect.SourceLocation 实例源码

项目:lams    文件:MethodInvocationProceedingJoinPoint.java   
@Override
public SourceLocation getSourceLocation() {
    if (this.sourceLocation == null) {
        this.sourceLocation = new SourceLocationImpl();
    }
    return this.sourceLocation;
}
项目:spring4-understanding    文件:MethodInvocationProceedingJoinPoint.java   
@Override
public SourceLocation getSourceLocation() {
    if (this.sourceLocation == null) {
        this.sourceLocation = new SourceLocationImpl();
    }
    return this.sourceLocation;
}
项目:spring    文件:MethodInvocationProceedingJoinPoint.java   
@Override
public SourceLocation getSourceLocation() {
    if (this.sourceLocation == null) {
        this.sourceLocation = new SourceLocationImpl();
    }
    return this.sourceLocation;
}
项目:TraceToPlantUml    文件:TracingEvent.java   
public TracingEvent(final TraceType traceType, final Class<? extends Object> source, final Class<? extends Object> target, final Signature signature, final SourceLocation sourceLocation, final Object... args) {
    this.traceType = traceType;
    this.source = source;
    this.target = target;
    this.signature = signature;
    this.sourceLocation = sourceLocation;
    this.args = args;
}
项目:TraceToPlantUml    文件:TracingAspect.java   
private void traceEntry(final Class<? extends Object> aThis, final Class<? extends Object> target, final Signature signature, final SourceLocation sourceLocation, final Object[] args) {
    if(aThis != null && target != null) {
        String message = aThis.getName() + " -> " + target.getName() + " : " + signature.getName() + "(" + Arrays.deepToString(args) + ")";
        messages.add(new TracingEvent(TraceType.ENTRY, aThis, target, signature, sourceLocation, args));
        System.out.println(message);
    }
}
项目:TraceToPlantUml    文件:TracingAspect.java   
private void traceExit(final Class<? extends Object> aThis, final Class<? extends Object> target, final Signature signature, final SourceLocation sourceLocation, final Object... returnValue) {
    if(aThis != null && target != null) {
        String message = target.getName() + " -> " + aThis.getName() + " : return" + "(" + Arrays.deepToString(returnValue) + ")";
        messages.add(new TracingEvent(TraceType.EXIT, aThis, target, signature, sourceLocation, returnValue));
        System.out.println(message);
    }
}
项目:TraceToPlantUml    文件:TracingAspect.java   
private void traceThrowing(final Class<? extends Object> aThis, final Class<? extends Object> target, final Signature signature, final SourceLocation sourceLocation, final Throwable throwable) {
    if(aThis != null && target != null) {
        String message = target.getName() + " -> " + aThis.getName() + " : throws" + "(" + throwable + ")";
        messages.add(new TracingEvent(TraceType.EXCEPTION, aThis, target, signature, sourceLocation, throwable));
        System.out.println(message);
    }
}
项目:logback-steno    文件:LogBuilderAspect.java   
/**
 * Before outputting the message inject additional context.
 *
 * @param joinPoint The <code>JoinPoint</code>.
 */
@Before("call(* com.arpnetworking.steno.LogBuilder.log())")
public void addToContextLineAndMethod(final JoinPoint joinPoint) {
    final SourceLocation sourceLocation = joinPoint.getSourceLocation();
    final LogBuilder targetLogBuilder = (LogBuilder) joinPoint.getTarget();
    targetLogBuilder.addContext("line", String.valueOf(sourceLocation.getLine()));
    targetLogBuilder.addContext("file", sourceLocation.getFileName());
    targetLogBuilder.addContext("class", sourceLocation.getWithinType());
}
项目:Sound.je    文件:JoinPointToStringHelper.java   
private static Class<?> getType(JoinPoint jp) {
    return Optional.ofNullable(jp.getSourceLocation())
            .map(SourceLocation::getWithinType)
            .orElse(jp.getSignature().getDeclaringType());
}
项目:herd    文件:MockProceedingJoinPoint.java   
@Override
public SourceLocation getSourceLocation()
{
    return null;
}
项目:superfly    文件:ExceptionConversionAspectTest.java   
public SourceLocation getSourceLocation() {
    return null;
}
项目:PerformanceHat    文件:AbstractProceedingJoinPointDecorator.java   
/**
 * {@inheritDoc}
 */
@Override
public SourceLocation getSourceLocation() {
  return joinPoint.getSourceLocation();
}
项目:class-guard    文件:MethodInvocationProceedingJoinPoint.java   
public SourceLocation getSourceLocation() {
    if (this.sourceLocation == null) {
        this.sourceLocation = new SourceLocationImpl();
    }
    return this.sourceLocation;
}
项目:TraceToPlantUml    文件:TracingEvent.java   
public SourceLocation getSourceLocation() {
    return sourceLocation;
}
项目:jcabi-aspects    文件:ImprovedJoinPoint.java   
@Override
public SourceLocation getSourceLocation() {
    return this.joinpoint.getSourceLocation();
}