Returning the implemented type with rest in java

darksoon

New Member
I was wondering if is it possible to force the rest framework in java to return the actual implementation of some class instead of information that is only visible in the abstract class.So I have a method that looks like \[code\]@GET@Path("/}")public Model getModel() { return (Car) system.getCar();}\[/code\]So I would like that when ever someones hits this path to what is returned is the information about the CAR and not just what is contained in the model. Is it possible to force this behavior with some annotations?PS The example above is just for demonstration. The actually reason is that I have a class that has a parameter of the abstract class and I would like to see the information in the xml about the concrete implementation so that I know what type it is.Thanks for assistance.cheers
 
Back
Top