Skip to content

A dynamically object factory implemented with java reflection and metadata.

Notifications You must be signed in to change notification settings

siomarapantarotto/java_reflection_object_factory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Object Factory

This mini project was created in 2001 for learning/tutorial purposes.

It was recently retrieved from Geocities.com, one of the most popular and successful free personal web hosting services of the 1990s, which was shut down in October 2009.

Apparently all sites hosted on the service would be deleted and could not be recovered.

Thanks to Geocities for not deleting this and many of my other projects.

An Example Using Metadata and Java Reflection

This demo uses metadata and java reflection to create a generic object factory.

The Manager class takes the name of a database table and the name of a java class as parameters and creates a class that represents the database entity. Everything is done with the use of java reflection that finds out how the table is structured in the database.

There is a total of 5 files that compose this demo:

  • DBConnection.java - Establishes connection to the database.
  • Employee.java - Defines Employee class.
  • Department.java - Defines Department class.
  • Manager.java - Factory Class.
  • MainDriver.java - Driver to test.

Technologies

     

Result Screenshot


     

About

A dynamically object factory implemented with java reflection and metadata.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages