Hi there,
I've been using @Type & wondering if there's a reason why it takes a classname String rather than a Class object? A Class object would participate in code refactoring easier than classname Strings, and also reduces the verbosity:
Code:
@Type(type = MyUserType.class)
Instead of:
Code:
@Type(type = "com.acme.data.usertypes.MyUserType")
We could also reduce it further by renaming the type() annotation method to the default annotation value() method:
Code:
@Type(MyUserType.class)
Although I see @Type's destined for further methods, so maybe this step isn't appropriate.
The only reason I can see for choosing classnames over classes is that the UserType's don't have to be in the project's classpath, but surely this is typically due to bad project structure?
Mark