Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] IManagedOptionValueHandler.isEnumValueAppropriate parameter type

At present, the signature of IManagedOptionValueHandler.isEnumValueAppropriate
is as follows:

	public boolean isEnumValueAppropriate(IBuildObject configuration,
			IHoldsOptions holder, IOption option, String extraArgument,
			String enumValue) 

It seems to be that the type and name of the first parameter are misleading.
First, looking at the name one can assume that it's configuration that is passed
in (and in fact, IConfiguration does extend IBuildObject). However,
in practice IResourceInfo is always passed in -- after upcast to IBuildObject.
Second, even assuming IBuildObject can be passed -- what is a poor method to do?
There's a dozen interfaces that directly extend IBuildObject, and it's unlikely
that any of that dozen can be passed.

So:

1. Why is the parameter type so needlessly generic?
2. Could this be fixed?

Thanks,
Volodya




Back to the top