Pierre De Rop | 6ce01ad | 2010-02-03 23:03:20 +0000 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 19 | package org.apache.felix.dm.annotation.api; |
| 20 | |
| 21 | import java.lang.annotation.ElementType; |
| 22 | import java.lang.annotation.Retention; |
| 23 | import java.lang.annotation.RetentionPolicy; |
| 24 | import java.lang.annotation.Target; |
| 25 | |
| 26 | /** |
Pierre De Rop | 699948d | 2010-03-06 23:35:52 +0000 | [diff] [blame] | 27 | * Annotation used to describe a property key-value pair. It is used when |
Pierre De Rop | 575a2f7 | 2010-05-23 08:20:50 +0000 | [diff] [blame] | 28 | * declaring {@link Service#properties()} attribute. |
Pierre De Rop | 6ce01ad | 2010-02-03 23:03:20 +0000 | [diff] [blame] | 29 | */ |
| 30 | @Retention(RetentionPolicy.CLASS) |
Pierre De Rop | 699948d | 2010-03-06 23:35:52 +0000 | [diff] [blame] | 31 | @Target( { ElementType.ANNOTATION_TYPE }) |
Pierre De Rop | 1474701 | 2010-02-06 07:50:04 +0000 | [diff] [blame] | 32 | public @interface Property |
Pierre De Rop | 6ce01ad | 2010-02-03 23:03:20 +0000 | [diff] [blame] | 33 | { |
| 34 | /** |
Pierre De Rop | 699948d | 2010-03-06 23:35:52 +0000 | [diff] [blame] | 35 | * Returns the property name. |
| 36 | * @return this property name |
Pierre De Rop | 3e58dde | 2010-02-06 07:28:58 +0000 | [diff] [blame] | 37 | */ |
Pierre De Rop | 699948d | 2010-03-06 23:35:52 +0000 | [diff] [blame] | 38 | String name(); |
Pierre De Rop | 3e58dde | 2010-02-06 07:28:58 +0000 | [diff] [blame] | 39 | |
| 40 | /** |
Pierre De Rop | 699948d | 2010-03-06 23:35:52 +0000 | [diff] [blame] | 41 | * Returns the property value |
| 42 | * @return this property value |
Pierre De Rop | 6ce01ad | 2010-02-03 23:03:20 +0000 | [diff] [blame] | 43 | */ |
Pierre De Rop | 575a2f7 | 2010-05-23 08:20:50 +0000 | [diff] [blame] | 44 | 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 Rop | 6ce01ad | 2010-02-03 23:03:20 +0000 | [diff] [blame] | 51 | } |