Here you can find the source of getMethodArgByIndex(final JoinPoint joinPoint, final int index)
public static Optional<Object> getMethodArgByIndex(final JoinPoint joinPoint, final int index)
//package com.java2s; //License from project: Apache License import org.aspectj.lang.JoinPoint; import java.util.Optional; public class Main { public static Optional<Object> getMethodArgByIndex(final JoinPoint joinPoint, final int index) { return Optional.ofNullable(joinPoint.getArgs()).filter(args -> index >= 0 && index < args.length) .map(args -> args[index]); }/*from www.j ava 2 s . c om*/ }