Whooo, Javadoc

Monday, May 11th, 2009 12:19 pm
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
[personal profile] afuna
The one thing I love about JavaDoc is that it starts with two stars. Makes it look special (and, in Eclipse, blue).

The things I don't like about JavaDoc are too many to count! But the list includes annotations! Why are you letting comments define behavior? That's just freaky.

On the flip side, documentation is a good warm up to the day, so!

Annotations

Date: 2009-05-11 09:09 pm (UTC)
allen: extras (extras)
From: [personal profile] allen
Annotations aren't really part of JavaDoc. They just look like it.

I really disliked annotations until I started using them with the new Java Persistence API (and Stripes). Now I love them. It's really nice to write

@Entity
@Table(name="organization")
public class Organization extends NamedBean  {

  @Id
  @GeneratedValue
  @Column(name="organization_id")
  private long organizationId;
  ...

and have all of the DB mapping code just handled there, rather than having to write separate Hibernate XML files.

Now if only there were a standard way to autogenerate accessor methods...