Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » List of annotation supported by Juno like @NonNull
List of annotation supported by Juno like @NonNull [message #897128] Sun, 22 July 2012 07:49 Go to next message
Javin Paul is currently offline Javin PaulFriend
Messages: 48
Registered: July 2011
Location: mumbai
Member

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.

Please let me know if you have any.

Javin
Re: List of annotation supported by Juno like @NonNull [message #897309 is a reply to message #897128] Mon, 23 July 2012 14:39 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 #897981 is a reply to message #897309] Wed, 25 July 2012 14:40 Go to previous messageGo to next message
Javin Paul is currently offline Javin PaulFriend
Messages: 48
Registered: July 2011
Location: mumbai
Member

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 ?
Re: List of annotation supported by Juno like @NonNull [message #898000 is a reply to message #897981] Wed, 25 July 2012 15:13 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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
Previous Topic:Multithreaded debugging in eclipse in remote box
Next Topic:PTP resource manager
Goto Forum:
  


Current Time: Fri Apr 26 17:59:16 GMT 2024

Powered by FUDForum. Page generated in 0.07762 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top