-
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.
WARNING: API broken changes! Implement components / injectors scan an…
…d auto instantiation.
- Loading branch information
Showing
49 changed files
with
749 additions
and
1,556 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
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
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
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,29 @@ | ||
= migration | ||
|
||
//tag::content[] | ||
JDK 1.4 features | ||
|
||
. assert operator `java -ea AssertPractice` | ||
. regular expressions `Pattern.compile(matchObj).matcher(origObj).group()/start()/end()` | ||
. splitting `"a String".split(" ");` | ||
. exception chaining / wrapping | ||
|
||
JDK 1.5 features | ||
|
||
. autoboxing / autounboxing | ||
. generics | ||
. for-each loop | ||
. vararg (Variable-Length Arguments) | ||
. emun (Enumerations) | ||
. annotations `getClass().getAnnotation()` | ||
. static import `import static java.lang.Math.*;` | ||
. c-lang printf() `new Formatter().format("dec: %d, hexa: %x, char: %c, doub: %1.4f.", 50, 50, 'A', 3.14).toString();` | ||
. Scanner `new Scanner("10 5 3 1") .nextInt()/.hasNextInt()` | ||
. collections (generics) `new ArrayList<Integer>(); new PriorityQueue<Double>()` | ||
. high-performance immutable StringBuilder (replacement of mutable StringBuffer) | ||
|
||
links: | ||
|
||
. link:https://www.topcoder.com/community/data-science/data-science-tutorials/new-features-of-java-1-5/[JDK 5], link:https://way2java.com/java-versions-2/jdk-1-5-java-se-5-version/[java 1.5 features] | ||
. link:http://www.oracle.com/technetwork/java/javase/adoptionguide-137484.html[JDK 6] | ||
//end::content[] |
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
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
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
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
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
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,25 +1,17 @@ | ||
package daggerok; | ||
|
||
import daggerok.app.Main; | ||
import daggerok.app.mappers.InputMapper; | ||
import daggerok.app.services.CapitalizeService; | ||
import daggerok.app.validators.InputValidator; | ||
import daggerok.context.DaggerokContext; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
public class App { | ||
public static void main(String[] args) { | ||
|
||
final DaggerokContext applicationContext = DaggerokContext.create(App.class.getPackage()); | ||
|
||
applicationContext.register(InputMapper.class, new InputMapper(applicationContext.getBean(InputValidator.class))) | ||
.register(CapitalizeService.class, new CapitalizeService(applicationContext.getBean(InputMapper.class))) | ||
.injectBeans(); | ||
final String name = args.length > 0 ? args[0] : "maksimko!"; | ||
|
||
final DaggerokContext applicationContext = DaggerokContext.create(App.class.getPackage()) | ||
.initialize(); | ||
final Main main = applicationContext.getBean(Main.class); | ||
|
||
final String name = args.length > 0 ? args[0] : "maksimko!"; | ||
main.sayHello(name); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.