public static final String NO_INIT_JPS_FOR_PARAMETERIZED_TYPES = "noInitJPsForParameterizedTypes";
public static final String NO_GENERIC_THROWABLES = "noGenericThrowables";
public static final String WITHINCODE_DOESNT_SUPPORT_PARAMETERIZED_DECLARING_TYPES="noParameterizedDeclaringTypesWithinCode";
-
+ public static final String EXECUTION_DOESNT_SUPPORT_PARAMETERIZED_DECLARING_TYPES="noParameterizedDeclaringTypesInExecution";
+ public static final String CALL_DOESNT_SUPPORT_PARAMETERIZED_DECLARING_TYPES="noParameterizedDeclaringTypesInCall";
public static String format(String key) {
return bundle.getString(key);
}
getSourceLocation()));
}
}
+
+ // no parameterized types in declaring type position
+ // no throwable parameterized types
+ if ((kind == Shadow.MethodExecution) || (kind == Shadow.ConstructorExecution)) {
+ HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor
+ visitor = new HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor();
+ signature.getDeclaringType().traverse(visitor, null);
+ if (visitor.wellHasItThen/*?*/()) {
+ scope.message(MessageUtil.error(WeaverMessages.format(WeaverMessages.EXECUTION_DOESNT_SUPPORT_PARAMETERIZED_DECLARING_TYPES),
+ getSourceLocation()));
+ }
+
+ visitor = new HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor();
+ signature.getThrowsPattern().traverse(visitor, null);
+ if (visitor.wellHasItThen/*?*/()) {
+ scope.message(MessageUtil.error(WeaverMessages.format(WeaverMessages.NO_GENERIC_THROWABLES),
+ getSourceLocation()));
+ }
+ }
+
+ // no parameterized types in declaring type position
+ // no throwable parameterized types
+ if ((kind == Shadow.MethodCall) || (kind == Shadow.ConstructorCall)) {
+ HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor
+ visitor = new HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor();
+ signature.getDeclaringType().traverse(visitor, null);
+ if (visitor.wellHasItThen/*?*/()) {
+ scope.message(MessageUtil.error(WeaverMessages.format(WeaverMessages.CALL_DOESNT_SUPPORT_PARAMETERIZED_DECLARING_TYPES),
+ getSourceLocation()));
+ }
+
+ visitor = new HasThisTypePatternTriedToSneakInSomeGenericOrParameterizedTypePatternMatchingStuffAnywhereVisitor();
+ signature.getThrowsPattern().traverse(visitor, null);
+ if (visitor.wellHasItThen/*?*/()) {
+ scope.message(MessageUtil.error(WeaverMessages.format(WeaverMessages.NO_GENERIC_THROWABLES),
+ getSourceLocation()));
+ }
+ }
}
public void resolveBindingsFromRTTI() {
noParameterizedTypesInGetAndSet=can't use parameterized type patterns for the declaring type of a get or set pointcut expression (use the raw type instead)
noInitJPsForParameterizedTypes=no [pre]initialization join points for parameterized types, use raw type instead
noGenericThrowables=invalid throws pattern: a generic class may not be a direct or indirect subclass of Throwable
-noParameterizedDeclaringTypesWithinCode=can't use parameterized type patterns for the declaring type of a withincode pointcut expression (use the raw type instead)
\ No newline at end of file
+noParameterizedDeclaringTypesWithinCode=can't use parameterized type patterns for the declaring type of a withincode pointcut expression (use the raw type instead)
+noParameterizedDeclaringTypesInExecution=can't use parameterized type patterns for the declaring type of an execution pointcut expression (use the raw type instead)
+noParameterizedDeclaringTypesInCall=can't use parameterized type patterns for the declaring type of a call pointcut expression (use the raw type instead)
\ No newline at end of file