    001/*-
    002 *******************************************************************************
    003 * Copyright (c) 2011, 2016 Diamond Light Source Ltd.
    004 * All rights reserved. This program and the accompanying materials
    005 * are made available under the terms of the Eclipse Public License v1.0
    006 * which accompanies this distribution, and is available at
    007 * http://www.eclipse.org/legal/epl-v10.html
    008 *
    009 * Contributors:
    010 *    Peter Chang - initial API and implementation and/or initial documentation
    011 *******************************************************************************/
    012
    013package org.eclipse.january.metadata;
    014
    015import java.lang.annotation.ElementType;
    016import java.lang.annotation.Retention;
    017import java.lang.annotation.RetentionPolicy;
    018import java.lang.annotation.Target;
    019
    020/**
    021 * This is an annotation for any metadata field that should be reshaped or squeezed. These include
    022 * lazy datasets, arrays and lists of lazy datasets, and maps where the values are lazy datasets.
    023 */
    024@Retention(RetentionPolicy.RUNTIME)
    025@Target(value = ElementType.FIELD)
    026public @interface Reshapeable {
    027        /**
    028         * @return true if size of top-level array or list should match rank of dataset
    029         */
    030        boolean matchRank() default false;
    031}