public static final ObjectType STRING = new ObjectType("java.lang.String");
public static final ObjectType OBJECT_ARRAY = new ObjectType("java.lang.Object[]");
public static final ObjectType STRING_ARRAY = new ObjectType("java.lang.String[]");
+ public static final ObjectType CLASS_ARRAY = new ObjectType("java.lang.Class[]");
public static final ObjectType STRINGBUFFER = new ObjectType("java.lang.StringBuffer");
public static final ObjectType STRINGBUILDER = new ObjectType("java.lang.StringBuilder");
public static final ObjectType THROWABLE = new ObjectType("java.lang.Throwable");
this.isExactDeclaringTypePattern = (declaringType instanceof ExactTypePattern);
}
+ @Override
public SignaturePattern resolveBindings(IScope scope, Bindings bindings) {
if (returnType != null) {
returnType = returnType.resolveBindings(scope, bindings, false, false);
* return a copy of this signature pattern in which every type variable reference is replaced by the corresponding entry in the
* map.
*/
+ @Override
public SignaturePattern parameterizeWith(Map<String, UnresolvedType> typeVariableMap, World w) {
SignaturePattern ret = new SignaturePattern(kind, modifiers, returnType.parameterizeWith(typeVariableMap, w), declaringType
.parameterizeWith(typeVariableMap, w), name, parameterTypes.parameterizeWith(typeVariableMap, w), throwsPattern
return ret;
}
+ @Override
public boolean matches(Member joinPointSignature, World world, boolean allowBridgeMethods) {
// fail (or succeed!) fast tests...
if (joinPointSignature == null) {
if (!parameterTypes.matches(resolvedParameters, TypePattern.STATIC, parameterAnnotationTypes).alwaysTrue()) {
// It could still be a match based on the generic sig parameter types of a parameterized type
- if (!parameterTypes.matches(world.resolve(aConstructor.getGenericParameterTypes()), TypePattern.STATIC).alwaysTrue()) {
+ if (!parameterTypes.matches(world.resolve(aConstructor.getGenericParameterTypes()), TypePattern.STATIC, parameterAnnotationTypes).alwaysTrue()) {
return FuzzyBoolean.MAYBE;
// It could STILL be a match based on the erasure of the parameter types??
// to be determined via test cases...
return annotationPattern;
}
+ @Override
public boolean isStarAnnotation() {
return annotationPattern == AnnotationTypePattern.ANY;
}
return isExactDeclaringTypePattern;
}
+ @Override
public boolean isMatchOnAnyName() {
return getName().isAny();
}
+ @Override
public List<ExactTypePattern> getExactDeclaringTypes() {
if (declaringType instanceof ExactTypePattern) {
List<ExactTypePattern> l = new ArrayList<ExactTypePattern>();
}
}
+ @Override
public boolean couldEverMatch(ResolvedType type) {
return declaringType.matches(type, TypePattern.STATIC).maybeTrue();
}