This repository was archived by the owner on Feb 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Provide Activity scope for @EBean #2206
Merged
WonderCsabo
merged 1 commit into
androidannotations:develop
from
smaugho:1488_provide_activity_scope_for_ebean
Mar 4, 2019
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...core/androidannotations-api/src/main/java/org/androidannotations/api/bean/BeanHolder.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /** | ||
| * Copyright (C) 2016-2019 the AndroidAnnotations project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
| * use this file except in compliance with the License. You may obtain a copy of | ||
| * the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed To in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package org.androidannotations.api.bean; | ||
|
|
||
| public interface BeanHolder { | ||
|
|
||
| <T> T getBean(Class<T> key); | ||
|
|
||
| <T> void putBean(Class<T> key, T value); | ||
|
|
||
| } |
22 changes: 22 additions & 0 deletions
22
...dannotations-test/src/main/java/org/androidannotations/test/ebean/ActivityScopedBean.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /** | ||
| * Copyright (C) 2016-2019 the AndroidAnnotations project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
| * use this file except in compliance with the License. You may obtain a copy of | ||
| * the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed To in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package org.androidannotations.test.ebean; | ||
|
|
||
| import org.androidannotations.annotations.EBean; | ||
|
|
||
| @EBean(scope = EBean.Scope.Activity) | ||
| public class ActivityScopedBean { | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...annotations-test/src/main/java/org/androidannotations/test/ebean/CyclicBeansFragment.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /** | ||
| * Copyright (C) 2016-2019 the AndroidAnnotations project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
| * use this file except in compliance with the License. You may obtain a copy of | ||
| * the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed To in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package org.androidannotations.test.ebean; | ||
|
|
||
| import org.androidannotations.annotations.Bean; | ||
| import org.androidannotations.annotations.EFragment; | ||
|
|
||
| import android.app.Fragment; | ||
|
|
||
| @EFragment | ||
| public class CyclicBeansFragment extends Fragment { | ||
|
|
||
| @Bean | ||
| SomeCyclicSingletonA singletonA; | ||
|
|
||
| @Bean | ||
| SomeCyclicSingletonB singletonB; | ||
|
|
||
| @Bean | ||
| SomeCyclicActivityScopedA cyclicActivityScopedA; | ||
|
|
||
| @Bean | ||
| SomeCyclicActivityScopedB cyclicActivityScopedB; | ||
|
|
||
| @Bean | ||
| SomeCyclicFragmentScopedA cyclicFragmentScopedA; | ||
|
|
||
| @Bean | ||
| SomeCyclicFragmentScopedB cyclicFragmentScopedB; | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...dannotations-test/src/main/java/org/androidannotations/test/ebean/FragmentScopedBean.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /** | ||
| * Copyright (C) 2016-2019 the AndroidAnnotations project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
| * use this file except in compliance with the License. You may obtain a copy of | ||
| * the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed To in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package org.androidannotations.test.ebean; | ||
|
|
||
| import org.androidannotations.annotations.EBean; | ||
|
|
||
| @EBean(scope = EBean.Scope.Fragment) | ||
| public class FragmentScopedBean { | ||
| } |
27 changes: 27 additions & 0 deletions
27
...tions-test/src/main/java/org/androidannotations/test/ebean/SomeCyclicActivityScopedA.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * Copyright (C) 2016-2019 the AndroidAnnotations project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
| * use this file except in compliance with the License. You may obtain a copy of | ||
| * the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed To in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package org.androidannotations.test.ebean; | ||
|
|
||
| import org.androidannotations.annotations.Bean; | ||
| import org.androidannotations.annotations.EBean; | ||
|
|
||
| @EBean(scope = EBean.Scope.Activity) | ||
| public class SomeCyclicActivityScopedA { | ||
|
|
||
| @Bean | ||
| SomeCyclicActivityScopedB activityScopedB; | ||
|
|
||
| } |
27 changes: 27 additions & 0 deletions
27
...tions-test/src/main/java/org/androidannotations/test/ebean/SomeCyclicActivityScopedB.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * Copyright (C) 2016-2019 the AndroidAnnotations project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
| * use this file except in compliance with the License. You may obtain a copy of | ||
| * the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed To in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package org.androidannotations.test.ebean; | ||
|
|
||
| import org.androidannotations.annotations.Bean; | ||
| import org.androidannotations.annotations.EBean; | ||
|
|
||
| @EBean(scope = EBean.Scope.Activity) | ||
| public class SomeCyclicActivityScopedB { | ||
|
|
||
| @Bean | ||
| SomeCyclicActivityScopedA activityScopedA; | ||
|
|
||
| } |
27 changes: 27 additions & 0 deletions
27
...tions-test/src/main/java/org/androidannotations/test/ebean/SomeCyclicFragmentScopedA.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * Copyright (C) 2016-2019 the AndroidAnnotations project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
| * use this file except in compliance with the License. You may obtain a copy of | ||
| * the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed To in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package org.androidannotations.test.ebean; | ||
|
|
||
| import org.androidannotations.annotations.Bean; | ||
| import org.androidannotations.annotations.EBean; | ||
|
|
||
| @EBean(scope = EBean.Scope.Fragment) | ||
| public class SomeCyclicFragmentScopedA { | ||
|
|
||
| @Bean | ||
| SomeCyclicFragmentScopedB fragmentScopedB; | ||
|
|
||
| } |
27 changes: 27 additions & 0 deletions
27
...tions-test/src/main/java/org/androidannotations/test/ebean/SomeCyclicFragmentScopedB.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * Copyright (C) 2016-2019 the AndroidAnnotations project | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
| * use this file except in compliance with the License. You may obtain a copy of | ||
| * the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed To in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package org.androidannotations.test.ebean; | ||
|
|
||
| import org.androidannotations.annotations.Bean; | ||
| import org.androidannotations.annotations.EBean; | ||
|
|
||
| @EBean(scope = EBean.Scope.Fragment) | ||
| public class SomeCyclicFragmentScopedB { | ||
|
|
||
| @Bean | ||
| SomeCyclicFragmentScopedA fragmentScopedA; | ||
|
|
||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.