I'm writing code to automatically generate database access code. In order to do this it needs to call the stored procedure with parameters extracted from an xml file. I've given each parameter an attribute sqltype which should take the name of one of the fields of java.sql.Types and then I'm using reflection to get the actual value of that field.
Now my problem is that to get the value of the field you need an instance of the class to reflect on, but Types can't be instantiated, so this is my work around, is there a better way?