From 09b7d473c0396c01afee4dc0963c1d4d1b91d421 Mon Sep 17 00:00:00 2001 From: acolyer Date: Thu, 21 Jul 2005 13:26:28 +0000 Subject: [PATCH] new warnings for generics in patterns --- weaver/src/org/aspectj/weaver/WeaverMessages.java | 5 +++++ weaver/src/org/aspectj/weaver/weaver-messages.properties | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/WeaverMessages.java b/weaver/src/org/aspectj/weaver/WeaverMessages.java index 52dcd664e..076d0bd32 100644 --- a/weaver/src/org/aspectj/weaver/WeaverMessages.java +++ b/weaver/src/org/aspectj/weaver/WeaverMessages.java @@ -132,6 +132,7 @@ public class WeaverMessages { public static final String INCORRECT_NUMBER_OF_TYPE_ARGUMENTS = "incorrectNumberOfTypeArguments"; public static final String VIOLATES_TYPE_VARIABLE_BOUNDS = "violatesTypeVariableBounds"; public static final String NO_STATIC_INIT_JPS_FOR_PARAMETERIZED_TYPES = "noStaticInitJPsForParameterizedTypes"; + public static final String NOT_A_GENERIC_TYPE="notAGenericType"; public static String format(String key) { return bundle.getString(key); @@ -149,4 +150,8 @@ public class WeaverMessages { return MessageFormat.format(bundle.getString(key),new Object[] {insert1, insert2, insert3}); } + public static String format(String key, Object insert1, Object insert2, Object insert3, Object insert4) { + return MessageFormat.format(bundle.getString(key),new Object[] {insert1, insert2, insert3, insert4}); + } + } diff --git a/weaver/src/org/aspectj/weaver/weaver-messages.properties b/weaver/src/org/aspectj/weaver/weaver-messages.properties index 442bb03e9..ddc4b79f6 100644 --- a/weaver/src/org/aspectj/weaver/weaver-messages.properties +++ b/weaver/src/org/aspectj/weaver/weaver-messages.properties @@ -140,6 +140,7 @@ bindingNonRuntimeRetentionAnnotation=Annotation type {0} does not have runtime r # Generics cantDecpMultipleParameterizations=Cannot declare parent {0} onto type {1} since it already has {2} in its hierarchy noParameterizedTypePatternInHandler=a parameterized type pattern may not be used in a handler pointcut expression -incorrectNumberOfTypeArguments=Wrong number of type arguments; Type {0} requires {1} -violatesTypeVariableBounds=Type {0} does not meet the specification for type parameter {1} in generic type {2} +incorrectNumberOfTypeArguments=Type pattern does not match because the wrong number of type parameters are specified: Type {0} requires {1} parameter(s) +violatesTypeVariableBounds=Type {0} does not meet the specification for type parameter {1} ({2}) in generic type {3} +notAGenericType=Type pattern does not match because {0} is not a generic type noStaticInitJPsForParameterizedTypes=no static initialization join points for parameterized types, use generic or raw type instead \ No newline at end of file -- 2.39.5