Skip to content

Commit c8c6c5a

Browse files
Refactoring : Scope is now declared as an inner class of EBean.
** This change make the future release non backward compatible **
1 parent c1e2234 commit c8c6c5a

2 files changed

Lines changed: 14 additions & 33 deletions

File tree

  • AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/EBean.java‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
import java.lang.annotation.RetentionPolicy;
2121
import java.lang.annotation.Target;
2222

23-
import org.androidannotations.api.Scope;
24-
2523
/**
2624
* Should be used on custom classes to enable usage of AndroidAnnotations
2725
*
@@ -36,6 +34,20 @@
3634
@Target(ElementType.TYPE)
3735
public @interface EBean {
3836

37+
public enum Scope {
38+
39+
/**
40+
* A new instance of the bean is created each time it is needed
41+
*/
42+
Default, //
43+
44+
/**
45+
* A new instance of the bean is created the first time it is needed, it is
46+
* then retained and the same instance is always returned.
47+
*/
48+
Singleton, //
49+
}
50+
3951
Scope scope() default Scope.Default;
4052

4153
}

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/api/Scope.java‎

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)