|
| 1 | +/** |
| 2 | + * Copyright (C) 2010-2013 eBusiness Information, Excilys Group |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 5 | + * use this file except in compliance with the License. You may obtain a copy of |
| 6 | + * the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed To in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | + * License for the specific language governing permissions and limitations under |
| 14 | + * the License. |
| 15 | + */ |
| 16 | +package org.androidannotations.annotations; |
| 17 | + |
| 18 | +import java.lang.annotation.ElementType; |
| 19 | +import java.lang.annotation.Retention; |
| 20 | +import java.lang.annotation.RetentionPolicy; |
| 21 | +import java.lang.annotation.Target; |
| 22 | + |
| 23 | +import android.app.IntentService; |
| 24 | + |
| 25 | +/** |
| 26 | + * Should be used on a method that must respond to a specific action in an |
| 27 | + * enhanced {@link IntentService}. The method name will be used as action name |
| 28 | + * unless the {@link #value()} field is set. |
| 29 | + * <p/ > |
| 30 | + * The method signature (with attributes) will be a part of the IntentBuilder |
| 31 | + * generated for the {@link EIntentService}. |
| 32 | + */ |
| 33 | +@Retention(RetentionPolicy.CLASS) |
| 34 | +@Target(ElementType.METHOD) |
| 35 | +public @interface ServiceAction { |
| 36 | + |
| 37 | + /** |
| 38 | + * Define the action's name. If this field isn't set the annotated method |
| 39 | + * name will be used. |
| 40 | + */ |
| 41 | + String value() default ""; |
| 42 | + |
| 43 | +} |
0 commit comments