本文整理汇总了Java中org.aspectj.lang.JoinPoint.StaticPart方法的典型用法代码示例。如果您正苦于以下问题:Java JoinPoint.StaticPart方法的具体用法?Java JoinPoint.StaticPart怎么用?Java JoinPoint.StaticPart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.aspectj.lang.JoinPoint
的用法示例。
在下文中一共展示了JoinPoint.StaticPart方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setArgumentNamesFromStringArray
import org.aspectj.lang.JoinPoint; //导入方法依赖的package包/类
public void setArgumentNamesFromStringArray(String[] args) {
this.argumentNames = new String[args.length];
for (int i = 0; i < args.length; i++) {
this.argumentNames[i] = StringUtils.trimWhitespace(args[i]);
if (!isVariableName(this.argumentNames[i])) {
throw new IllegalArgumentException(
"'argumentNames' property of AbstractAspectJAdvice contains an argument name '" +
this.argumentNames[i] + "' that is not a valid Java identifier");
}
}
if (argumentNames != null) {
if (aspectJAdviceMethod.getParameterTypes().length == argumentNames.length + 1) {
// May need to add implicit join point arg name...
Class<?> firstArgType = aspectJAdviceMethod.getParameterTypes()[0];
if (firstArgType == JoinPoint.class ||
firstArgType == ProceedingJoinPoint.class ||
firstArgType == JoinPoint.StaticPart.class) {
String[] oldNames = argumentNames;
argumentNames = new String[oldNames.length + 1];
argumentNames[0] = "THIS_JOIN_POINT";
System.arraycopy(oldNames, 0, argumentNames, 1, oldNames.length);
}
}
}
}
示例2: getStaticPart
import org.aspectj.lang.JoinPoint; //导入方法依赖的package包/类
@Override
public JoinPoint.StaticPart getStaticPart() {
return this;
}
示例3: maybeBindThisJoinPointStaticPart
import org.aspectj.lang.JoinPoint; //导入方法依赖的package包/类
private void maybeBindThisJoinPointStaticPart() {
if (this.argumentTypes[0] == JoinPoint.StaticPart.class) {
bindParameterName(0, THIS_JOIN_POINT_STATIC_PART);
}
}