001// Copyright 2007, 2008, 2009 The Apache Software Foundation 002// 003// Licensed under the Apache License, Version 2.0 (the "License"); 004// you may not use this file except in compliance with the License. 005// You may obtain a copy of the License at 006// 007// http://www.apache.org/licenses/LICENSE-2.0 008// 009// Unless required by applicable law or agreed to in writing, software 010// distributed under the License is distributed on an "AS IS" BASIS, 011// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 012// See the License for the specific language governing permissions and 013// limitations under the License. 014 015package org.apache.tapestry5.annotations; 016 017import org.apache.tapestry5.model.ComponentModel; 018 019import java.lang.annotation.Documented; 020import static java.lang.annotation.ElementType.TYPE; 021import java.lang.annotation.Retention; 022import static java.lang.annotation.RetentionPolicy.RUNTIME; 023import java.lang.annotation.Target; 024 025import static org.apache.tapestry5.ioc.annotations.AnnotationUseContext.*; 026import org.apache.tapestry5.ioc.annotations.UseWith; 027 028/** 029 * Allows for the specification of per-component meta-data. Meta data can later be accessed via {@link 030 * ComponentModel#getMeta(String)}. Meta data keys are case insensitive. Meta data defined by a subclass overrides meta 031 * data for the super class (where the keys conflict). 032 * 033 * @see org.apache.tapestry5.MetaDataConstants 034 */ 035@Target(TYPE) 036@Retention(RUNTIME) 037@Documented 038@UseWith({COMPONENT,MIXIN,PAGE}) 039public @interface Meta 040{ 041 /** 042 * The meta data as a list of "name=value" elements. 043 */ 044 String[] value(); 045}