001/* 002 * (C) Copyright 2015 Nuxeo SA (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl-2.1.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Nicolas Chapurlat <nchapurlat@nuxeo.com> 016 */ 017 018package org.nuxeo.ecm.core.io.registry.reflect; 019 020import java.lang.annotation.Documented; 021import java.lang.annotation.ElementType; 022import java.lang.annotation.Retention; 023import java.lang.annotation.RetentionPolicy; 024import java.lang.annotation.Target; 025 026import org.nuxeo.ecm.core.io.registry.MarshallerRegistry; 027 028/** 029 * Annotation used to setup a class as a marshaller and define its instantiation mode and priority. 030 * <p> 031 * see {@link Instantiations} for instantiation mode explanation. 032 * </p> 033 * <p> 034 * see {@link MarshallerRegistry} for instantiation rules. 035 * </p> 036 * 037 * @since 7.2 038 */ 039@Documented 040@Retention(RetentionPolicy.RUNTIME) 041@Target(ElementType.TYPE) 042public @interface Setup { 043 044 /** 045 * see {@link Instantiations} for values. 046 * 047 * @since 7.2 048 */ 049 Instantiations mode(); 050 051 /** 052 * see {@link Priorities} for example values. 053 * 054 * @since 7.2 055 */ 056 int priority() default Priorities.DEFAULT; 057 058}