Re: [Simple-support] XML file path in deserialized objects
Brought to you by:
niallg
|
From: Aaron D. <di...@he...> - 2012-04-10 10:08:01
|
Zitat von Jens Wurster <jw...@to...>:
> how can I get the xml file path (or object) in deserialized objects?
Write a helper/factory method that calls serializer.read(), sets the
field and then returns the new instance.
Regards,
> For example:
>
> Test obj = serializer.read(Test.class, new File("test.xml"));
>
> @Root
> public class Test implements Serializable {
>
> @Attribute
> private String id;
>
> @File
> private File file; // This should contain the file path or object
> of the xml file
>
> public String getId() {
> return id;
> }
> }
>
> Thanks and
> best regards
>
> Jens
>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/ http://blog.pdark.de/
|