-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3943f05
commit 4df8c2c
Showing
5 changed files
with
225 additions
and
224 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
108 changes: 54 additions & 54 deletions
108
src/test/java/dinistiq/test/components/ConstructorInjection.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 |
---|---|---|
@@ -1,54 +1,54 @@ | ||
/** | ||
* | ||
* Copyright 2014-2020 Martin Goellnitz | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
package dinistiq.test.components; | ||
|
||
import javax.inject.Inject; | ||
import javax.inject.Named; | ||
import javax.inject.Singleton; | ||
import lombok.Getter; | ||
|
||
|
||
/** | ||
* Test injections of contructor parameters. | ||
*/ | ||
@Named | ||
@Singleton | ||
public class ConstructorInjection { | ||
|
||
@Getter | ||
private String string; | ||
|
||
|
||
/** | ||
* Constructor with injection point in parameter list. | ||
*/ | ||
@Inject | ||
public ConstructorInjection(@Named("b") String string) { | ||
this.string = string; | ||
} | ||
|
||
|
||
/** | ||
* Unused constrctor - exception in error cases. | ||
*/ | ||
public ConstructorInjection() { | ||
this("wrong default"); | ||
} | ||
|
||
} // ConstructorInjection | ||
/** | ||
* | ||
* Copyright 2014-2020 Martin Goellnitz | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
package dinistiq.test.components; | ||
|
||
import javax.inject.Inject; | ||
import javax.inject.Named; | ||
import javax.inject.Singleton; | ||
import lombok.Getter; | ||
|
||
|
||
/** | ||
* Test injections of contructor parameters. | ||
*/ | ||
@Named | ||
@Singleton | ||
public class ConstructorInjection { | ||
|
||
@Getter | ||
private String string; | ||
|
||
|
||
/** | ||
* Constructor with injection point in parameter list. | ||
*/ | ||
@Inject | ||
public ConstructorInjection(@Named("b") String string) { | ||
this.string = string; | ||
} | ||
|
||
|
||
/** | ||
* Unused constrctor - exception in error cases. | ||
*/ | ||
public ConstructorInjection() { | ||
this("wrong default"); | ||
} | ||
|
||
} // ConstructorInjection |
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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
/** | ||
* | ||
* Copyright 2014-2020 Martin Goellnitz | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
package dinistiq.test.components; | ||
|
||
import javax.inject.Inject; | ||
import lombok.Getter; | ||
|
||
|
||
/** | ||
* Test vehicle class used as member of the set of beans passed over before | ||
* bean scan and injection application. | ||
*/ | ||
public class InitialBean { | ||
|
||
@Inject | ||
@Getter | ||
private TestInterface test; | ||
|
||
} // InitialBean | ||
/** | ||
* | ||
* Copyright 2014-2020 Martin Goellnitz | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
package dinistiq.test.components; | ||
|
||
import javax.inject.Inject; | ||
import lombok.Getter; | ||
|
||
|
||
/** | ||
* Test vehicle class used as member of the set of beans passed over before | ||
* bean scan and injection application. | ||
*/ | ||
public class InitialBean { | ||
|
||
@Inject | ||
@Getter | ||
private TestInterface test; | ||
|
||
} // InitialBean |
Oops, something went wrong.