Solved

Metadata of a class

Posted on 2001-06-27
2
228 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
Comment Utility
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
Comment Utility
look at the reflection mechanism
java.lang.reflect.*
explor your objects at run time
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now