View RSS Feed

Recent Blogs Posts

  1. Annotations

    by , 04-26-2012 at 05:26 PM
    Annotations provide that data regarding program which is not programís part. No direct effect they have at the code operation, they annotate.

    Uses of the annotations are as following:

    • Information for compiler: Annotations can be used by the compiler for detection of the errors or suppress warning.
    • Deployment and compiler-time processing: Software tools can process the annotation information so that to generate the code, XML files or so forth.
    • Runtime processing:
    ...
    Tags: annotations Add / Edit Tags
    Categories
    Tutorial
  2. Using Annotations for Transactions in Spring

    by , 11-27-2011 at 10:38 PM
    In the previous tip, I showed you how you could use XML to define a transaction. In this tip we will look at doing the same using annotations. It is blindly simple to use annotations for transactions. The tx namespace provides the <tx:annotation-driven> element. It appears like this :

    Java Code:
    <tx:annotation-driven transaction-manager="txManager" />
    With this you can now define transaction rules very easily. This tag tells Spring to examine all beans in ...
  3. @SuppressWarnings annotation

    by , 11-21-2011 at 04:34 PM (My Java Tips)
    In this post, I will be talking briefly about SuppressWarnings annotation.


    Java compiler gives you warnings to assure that you know what is happening. Sometimes, you want donít want the warnings. Java 5.0 provides a way for this.

    One had to use SuppressWarnings annotation to ignore the warnings. Annotations are followed by @.

    For example: consider the following code:
    Java Code:
    int a;
    Object object = new Object();
    I declared two variables ...