Is it possible to use JAXB to create an XML attribute from a function that includes a parameter? I'd like to do something like this:
@XmlRootElement
public class App {
@XmlAttribute
public boolean isOwned( User user ) {
return user.ownsApp( getId( ) );
}
}
How can I get the User parameter into this function call when marshalling the App class to XML? I'm not concerned with unmarshalling.