本文整理匯總了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);
}
}