|
Hi, Matthias:
I'm no Castor expert,but I can tell you that
Class.newInstance() requires a no argument constructor be available on the
Class whose instance you are trying to
construct.
From the Javadocs->
****************
public Object newInstance() throws InstantiationException, IllegalAccessException Creates a new instance of the class represented by this Class
object. The class is instantiatied as if by a
new expression with
an empty argument list. The class is initialized if it has not already been
initialized. ****************
As a workaround you could create a pass-through
proxy that for CoordinateFormatEnum that knows how
to construct
an instance of a CoordinateFormatEnum. This proxy
would implement all methods of CoordinateFormatEnum and just
delegate the calls to the embedded CoordinateFormatEnum
instance.
That's one way... maybe the Castor guys can
suggest a better one.. I'd be interested in finding out as well
since I find creation
of these proxies to be a hassle.. but they get the job
done.
thanks
Chris
|
Title: NotConstructable Exception and FieldHandler
- [castor-dev] NotConstructable Exception and FieldHandler Matthias David
- Re: [castor-dev] NotConstructable Exception and FieldH... Chris Bedford
- Re: [castor-dev] NotConstructable Exception and FieldH... Keith Visco
- Re: [castor-dev] NotConstructable Exception and Fi... Chris Bedford
- Re: [castor-dev] NotConstructable Exception an... Keith Visco
- Re: [castor-dev] NotConstructable Exceptio... Keith Visco
- Re: [castor-dev] NotConstructable Exc... Keith Visco
- Re: [castor-dev] NotConstructable Exception and FieldH... Keith Visco
- Re: [castor-dev] NotConstructable Exception and Fi... Chris Bedford
- Re: [castor-dev] NotConstructable Exception and FieldH... Matthias David
- Re: [castor-dev] NotConstructable Exception and FieldH... Matthias David
