Community
Participate
Working Groups
IQueryContext makes some use of generics, but we could improve type safety by using it a little more. E.g. instead of Object get(Class<?> type, Argument.Advice advice); have <T> T get(Class<T> type, Argument.Advice advice); It might be a bit harder to convert String convertToString(Class<?> type, Argument.Advice advice, Object value) to <T> String convertToString(Class<T> type, Argument.Advice advice, T value) as SnapshotQueryContext converts ISnapshot.class to SnapshotArgument and int.class to HeapObjectParamArgument Are these compatible changes as the type erasure is the same, and IQueryContext is noimplement, and so the source uses should be compatible.
Andrew, in some SAP coding we have classes implementing the IQueryContext, despite of the @noimplement remark. I'd like to check first how the changes you suggest affect these.
This issue has been migrated to https://github.com/eclipse-mat/org.eclipse.mat/issues/9.