Re: @override?
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Mon, 30 Jul 2007 13:42:04 -0400
"Roedy Green" <see_website@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:5h6ha3t6vhu9u7rhnp9pae2ior0idoj0di@xxxxxxxxxx
On Thu, 26 Jul 2007 08:16:48 GMT, "George3" <u19006@uwe> wrote, quoted
or indirectly quoted someone who said :
Are there any samples of how to use @override?like any annotation, you put it between the JavaDoc and the method
definition. see http://mindprod.com/jgloss/annotations.html
Annotations can appear in other locations than on a method (but for
@Override, it only makes sense in that location).
You can put annotations on fields, or on specific parameters of a
method, for example.
public class Example {
@DoNotSerialize
public int fieldThatShouldntBeSerialized;
public int myMethod(@NonNull String foo) {
/*doesn't check against null here, because the contract of the method
assumes that it won't receive null as a parameter.*/
return foo.hashcode();
}
}
- Oliver
.
- References:
- @override?
- From: George3
- Re: @override?
- From: Lew
- Re: @override?
- From: Lew
- Re: @override?
- From: George3
- Re: @override?
- From: Roedy Green
- @override?
- Prev by Date: Re: Web Application Works on Windows, Not on Linux (Needs a file)
- Next by Date: Re: Is there a better way to do this?
- Previous by thread: Re: @override?
- Next by thread: Re: @override?
- Index(es):