?
Solved

Metadata of a class

Posted on 2001-06-27
2
Medium Priority
?
263 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
[X]
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
2 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 200 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

741 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