src.javax.xml.bind.annotation.XmlAttachmentRef Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ehcache Show documentation
Show all versions of ehcache Show documentation
Ehcache is an open source, standards-based cache used to boost performance,
offload the database and simplify scalability. Ehcache is robust, proven and full-featured and
this has made it the most widely-used Java-based cache.
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.xml.bind.annotation;
import javax.activation.DataHandler;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;
/**
* Marks a field/property that its XML form is a uri reference to mime content.
* The mime content is optimally stored out-of-line as an attachment.
*
* A field/property must always map to the {@link DataHandler} class.
*
* Usage
*
* @{@link XmlRootElement}
* class Foo {
* @{@link XmlAttachmentRef}
* @{@link XmlAttribute}
* {@link DataHandler} data;
*
* @{@link XmlAttachmentRef}
* @{@link XmlElement}
* {@link DataHandler} body;
* }
*
* The above code maps to the following XML:
*
*
*
*
*
*
*
*
*
*
*
*
* The above binding supports WS-I AP 1.0 WS-I Attachments Profile Version 1.0.
*
* @author Kohsuke Kawaguchi
* @since JAXB2.0
*/
@Retention(RUNTIME)
@Target({FIELD,METHOD,PARAMETER})
public @interface XmlAttachmentRef {
}