The quickest way to get a complete list would be to grab a byte-code analyzer and just go through all the jars and look for signatures. I'm not sure why anybody would need a list like this, but that'd be how I'd get it.
Matthew Cox
Greenhorn
Joined: May 25, 2009
Posts: 29
posted
0
Ankur Pandya wrote:Hi, Anyone can tell me name of some methods which can not be overriden in JAVA..?
Like Static, Final etc....
Based on your wording, I think what you are trying to ask is, "What type of modifiers can prevent methods from being overriden?"
If my assumption is correct then the answer would be marking something as final (a field modifier).
There are drawbacks to marking anything as final method or variable. So my recommendation is to consider the purpose of the class and the need to mark something as final.
If this is not the case then the resources that the other posters have given would be more than sufficient
Matthew Cox wrote:There are drawbacks to marking anything as final method or variable.
What are all the drawbacks?
Matthew Cox
Greenhorn
Joined: May 25, 2009
Posts: 29
posted
0
seetharaman venkatasamy wrote:
Matthew Cox wrote:There are drawbacks to marking anything as final method or variable.
What are all the drawbacks?
variables and methods marked as final have the drawback of the following:
1. Scale of use - Items that utilize final are more commonly data structures or prohibitive supertypes as they cannot be modified (method or object) and can only be assigned a value or implementation (respectively) once.
2. Flexibility - Future builds of your code could have dependencies upon objects, variables, and methods that are marked as final, but conflict with newer code requirements.
3. Incompatibility with Inheritance (as in the item cannot be extended or enhanced in any form)
-Although, I do understand and admit that in most cases, the use of final would be just for this purpose, to prevent modification
I want to make a clear statement though. I only mentioned the "drawbacks" in relation to the possibility of using final haphazardly. If this modifier is used correctly, then drawbacks will not be an issue. But simply using this modifier to restrict access without regards to future modification or needs would be careless at best.
Since the question was semi-vague to begin with (no offense meant to the original poster), I merely wanted to give warning if this was the case for him.
P.s
I bet there are more, but since I possess only so much knowledge =P that is all I can list for now.