Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Metadata of a class

Posted on 2001-06-27
2
243 Views
Last Modified: 2013-11-23
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
Comment
Question by:chloh
2 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 50 total points
ID: 6230726
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
 
LVL 1

Expert Comment

by:boazbl1
ID: 6230907
look at the reflection mechanism
java.lang.reflect.*
explor your objects at run time
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This video teaches viewers about errors in exception handling.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question