Results 1 to 2 of 2
  1. #1
    athar is offline Member
    Join Date
    Feb 2013
    Posts
    9
    Rep Power
    0

    Default How to add annotations to getter and setter property?

    Hi
    I have define property as
    // Value Date
    public void setValueDate(String valDate)
    {
    sValueDate = valDate;
    }
    public String getValueDate()
    {
    return sValueDate;
    }
    I want to add annotation to check for nulls, length for validation purpose. How to add annotation ?
    Thanks in advance

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,864
    Rep Power
    8

    Default Re: How to add annotations to getter and setter property?

    What have you tried? Without more detail, the best we can do is point you here: https://www.google.com/search?q=java+annotations
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. getter and setter method using Jcreator
    By couline in forum New To Java
    Replies: 7
    Last Post: 01-22-2012, 02:02 PM
  2. help with getter and setter methods of this question.
    By luciawashaya in forum New To Java
    Replies: 6
    Last Post: 11-01-2011, 11:28 AM
  3. getter and setter method help please!
    By merdzins in forum New To Java
    Replies: 2
    Last Post: 12-06-2010, 05:06 AM
  4. use of private in getter and setter
    By katturv in forum New To Java
    Replies: 1
    Last Post: 12-03-2010, 07:17 PM
  5. Replies: 4
    Last Post: 01-01-2009, 12:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •