Thread:
 Thanks 
 batter   25 Sep 2006, 00:22 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: batter (25 Sep 2006, 00:22) Replies: 0, Views: 26411
Subject: Thanks
Using some ideas from the flexible solution I was getting an exception 
on the nullSaveGet method:

object is not an instance of declaring class.

So I changed:

valueOfMethod.invoke(enumClass, new Object [] {ordinal});

to

valueOfMethod.invoke(enumClass.getEnumConstants()[0], new Object [] 
{ordinal});

Did anyone else run into this?  Is there a better way of doing this?
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]