|
Re: List of annotation supported by Juno like @NonNull [message #897309 is a reply to message #897128] |
Mon, 23 July 2012 10:39   |
Eclipse User |
|
|
|
On 22.07.2012 09:49, Javin Paul wrote:
> Hi Guys,
>
> Does anyone has quick list of annotation supported by Eclipse Juno for
> debugging and code quality purpose, I think @NonNull is one of them.
We have three kinds of annotations along with default that we ship in
Eclipse. Those defaults can be changed in case you already use other
similar annotations in your code.
* *'**Nullable*: A fully qualified name of a Java annotation type
(*org.eclipse.jdt.annotation.Nullable* by default), which when
applied to a type in a method signature or variable declaration,
will be interpreted as a specification that null is a legal value in
that position.
Currently supported positions are: method parameters, method return
type and local variables.
* *'NonNull'*: A fully qualified name of a Java annotation type
(*org.eclipse.jdt.annotation.NonNull* by default), which when
applied to a type in a method signature or variable declaration,
will be interpreted as a specification that null is *not* a legal
value in that position.
Currently supported positions are: method parameters, method return
type and local variables.
* *'NonNullByDefault'*: A fully qualified name of a Java annotation
type (*org.eclipse.jdt.annotation.NonNullByDefault* by default).
When applied to an element without an annotation argument, all
unannotated types in method signatures within the annotated element
will be treated as if they were specified with the non-null annotation.
On the contrary, when the annotation is applied with the constant
'false' as its argument, all corresponding defaults at outer scopes
will be canceled for the annotated element.
Dani
>
> Javin
|
|
|
|
Re: List of annotation supported by Juno like @NonNull [message #898000 is a reply to message #897981] |
Wed, 25 July 2012 11:13  |
Eclipse User |
|
|
|
On 25.07.2012 16:40, Javin Paul wrote:
> Thanks Dani much appreciated, This what I was looking for.
> By the way Does Eclipse also allow to use annotations from static
> analysis tools like findbug ?
If FindBugs has annotations that logically do the same thing (e.g.
'NonNull' semantics), then you can tell Eclipse to use those.
Dani
|
|
|
Powered by
FUDForum. Page generated in 0.31307 seconds