|
This will not be completed in Lawton. does this mean selecting by interfaces will work also? Implemented in trunk and tested with examples from the Wicket framework. Hi Eugene, I've added 2 tests that demonstrate these 2 cases:
And both of the tests fail if I just instrument the interface or the base class. The tests name are: They are currently disabled. Hung, your test cases are NOT using expression for subtype matching. Please check the existing SubtypeMatchingTest that I've added and incorporate your tests into that one. Anyways, I've committed fix for your test apps. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Here is the old code Jonas wrote for subtype matching.
public boolean isAdaptable(ClassInfo classInfo) {
String fullName = classInfo.getName();
if (isInAdaptableCache(fullName)) { return isCachedAdaptable(fullName); }
// We make inner classes of logical classes not instrumented while logical
// bases are instrumented
String name = baseClassNameWithoutInners(fullName);
if (isLogical(name)) { return cacheIsAdaptable(fullName, name.equals(fullName)); }
if (hasCustomAdatper(fullName)) { return cacheIsAdaptable(fullName, true); }
if (getSpec(name) != null) { return cacheIsAdaptable(name, true); }
if (getSpec(fullName) != null) { return cacheIsAdaptable(name, true); }
classInfoFactory.setClassInfo(classInfo);
ExpressionContext ctxt = expressionHelper.createWithinExpressionContext(classInfo);
if (isExplicitlyExcluded(fullName, ctxt)) return cacheIsAdaptable(fullName, false);
if (isExplicitlyIncluded(ctxt)) { return cacheIsAdaptable(fullName, true); }
return cacheIsAdaptable(fullName, false);
}