API-Typeable-POJOs provides a way for an object to specify which API interface it implements, in addition to standard java reflection getClass() method.
Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
api
spi
.gitignore
README
pom.xml

README

API-Typeable-POJOs
==================

This is a small and compact framework for developers handling large API type hierarchies. If it can be assumed, that each object implements either one API interface, or many API interfaces such that one interface is sub-interface of all the rest, then this framework is applicable.

The API of this framework provides getImplementedType() -method in Typeable-interface, which should return the implemented API interface of the object, rather than actual implementing class of the object. Your API base interfaces should extend this Typeable-interface.

The SPI of this framework provides skeleton implementations for Typeable-interface, and also skeleton implementations that efficiently map each Typeable type to some other object (for example, an algorithm or some other functionality). Your implementations of your API should extend the TypeableImpl skeleton implementation.