Firstly hello everybody!
I am very new to javassist and am trying to write a class / function, which implements an
interface which is passed to it.
So its something like
MyInterfac p = ImplFactory.implement(MyInterface.class);
What i need is to annotate the field of the implemented class with annotations, which i
have read from the interface.
Bsp.:
Interface:
public interface PersonTestInterface {
public static final String foaf = "http://xmlns.com/foaf/0.1/";
@rdf(foaf+"surname") <-----take this
public Collection getSurnames();
}
should be implemented as:
public class PersonTestInterfaceImpl
implements PersonTestInterface
{
@rdf(foaf+"surname") <---- put it here
private Collection surnames;
public Collection getSurnames()
{
return surnames;
}
}
Could someone help me and tell how to create the annotations on the fields? The easiest
way would be somethink to "copy" the annotations.
Eugen
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148638#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...