-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Renaming RoundEnvironementInternal - Refactor Context and Context internal - remove old method - add objectGraph
- Loading branch information
pith
committed
Oct 8, 2015
1 parent
1f156e6
commit 5dbab62
Showing
14 changed files
with
1,056 additions
and
1,240 deletions.
There are no files selected for viewing
This file contains 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
51 changes: 51 additions & 0 deletions
51
core/src/main/java/io/nuun/kernel/core/internal/ContextInternal.java
This file contains 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,51 @@ | ||
/** | ||
* Copyright (C) 2013-2014 Kametic <[email protected]> | ||
* | ||
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3, 29 June 2007; | ||
* or any later version | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.gnu.org/licenses/lgpl-3.0.txt | ||
* | ||
* 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 io.nuun.kernel.core.internal; | ||
|
||
import com.google.inject.Injector; | ||
import io.nuun.kernel.api.di.ObjectGraph; | ||
import io.nuun.kernel.api.plugin.context.Context; | ||
|
||
import javax.inject.Inject; | ||
import javax.inject.Singleton; | ||
|
||
/** | ||
* @author Epo Jemba | ||
* | ||
*/ | ||
@Singleton | ||
public class ContextInternal implements Context | ||
{ | ||
|
||
public final Injector mainInjector; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param mainInjector the guice main injector | ||
*/ | ||
@Inject | ||
public ContextInternal(Injector mainInjector) | ||
{ | ||
this.mainInjector = mainInjector; | ||
} | ||
|
||
@Override | ||
public ObjectGraph applicationObjectGraph() { | ||
return new ObjectGraphEmbedded(mainInjector); | ||
} | ||
} |
Oops, something went wrong.