blob: c87d7e842b79382e97f1394f9ece6f62e608392d [file] [log] [blame]
Pierre De Rop6ce01ad2010-02-03 23:03:20 +00001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19package org.apache.felix.dm.annotation.api;
20
21import java.lang.annotation.ElementType;
22import java.lang.annotation.Retention;
23import java.lang.annotation.RetentionPolicy;
24import java.lang.annotation.Target;
25
26/**
Pierre De Rop699948d2010-03-06 23:35:52 +000027 * Annotation used to describe a property key-value pair. It is used when
Pierre De Rop575a2f72010-05-23 08:20:50 +000028 * declaring {@link Service#properties()} attribute.
Pierre De Rop6ce01ad2010-02-03 23:03:20 +000029 */
30@Retention(RetentionPolicy.CLASS)
Pierre De Rop699948d2010-03-06 23:35:52 +000031@Target( { ElementType.ANNOTATION_TYPE })
Pierre De Rop14747012010-02-06 07:50:04 +000032public @interface Property
Pierre De Rop6ce01ad2010-02-03 23:03:20 +000033{
34 /**
Pierre De Rop699948d2010-03-06 23:35:52 +000035 * Returns the property name.
36 * @return this property name
Pierre De Rop3e58dde2010-02-06 07:28:58 +000037 */
Pierre De Rop699948d2010-03-06 23:35:52 +000038 String name();
Pierre De Rop3e58dde2010-02-06 07:28:58 +000039
40 /**
Pierre De Rop699948d2010-03-06 23:35:52 +000041 * Returns the property value
42 * @return this property value
Pierre De Rop6ce01ad2010-02-03 23:03:20 +000043 */
Pierre De Rop575a2f72010-05-23 08:20:50 +000044 String value() default "";
45
46 /**
47 * Returns the property values as a String array).
48 * @return this property value as a String array
49 */
50 String[] values() default {};
Pierre De Rop6ce01ad2010-02-03 23:03:20 +000051}