Solved

Metadata of a class

Posted on 2001-06-27
2
247 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Breakpoint doesn't stop in my variable 3 38
Java basic valueOf question 1 34
hashmap order 17 42
Delete .class files at every compile 4 20
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.

733 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