Hi. In a large Application is there any way to distinguish user-defined classes with built-in classes without checking ?
views:
46answers:
3In a large Application is there any way to distinguish user-defined classes with built-in classes?
Who is going to distinguish it? Developers? Classes?
If Developers - Naming conventions If Classes - you might wanna check the inheritance (parent)
You haven't specified which platform you're talking about, but in both Java and .NET, you're recommended to use the organisation name in the namespace, e.g. Microsoft.CSharp.*
or com.google.base.*
. That means if you know the full name of the class, it should be fairly obvious where it comes from... and an IDE will generally show you the full name of the class (including the namespace) if you hover over the brief name in code.
If this doesn't help, please clarify the question.
I agree with Joh Skeet, you simply need to hover over the name of the class toget where it came from.
But, -- IF you're using .NET, and need a way to do it programmatically -- you could use reflection to get the assembly where the said class is defined, and probably the assembly does have the Company meta-data property set.