• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 279
  • Last Modified:

Metadata of a class

I'm developing a transformation engine that can transform a java object to xml. I wonder does the current java api supports obtaining a metadata of a class. For example, an type of an attribute. Some codes are appreciated.
0
chloh
Asked:
chloh
1 Solution
 
TimYatesCommented:
Have you had a look at these:

http://www-sop.inria.fr/koala/XML/serialization/
http://sourceforge.net/projects/xmlserializer/

They are opensource (GPL) projects that do what you are attempting...

Good Luck,

Tim.

PS:  I guess you would be looking for:

  this.getClass().getFields()
  this.getClass().getMethods()
  etc...
0
 
boazbl1Commented:
look at the reflection mechanism
java.lang.reflect.*
explor your objects at run time
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now