Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hjohn committed May 30, 2022
1 parent 0eb7dd5 commit 95837eb
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ are extensions to support:
|Optional Injection|`@Opt`|-|`@Opt`|`@Opt`|
|Producer Support|`@Produces`|`@Produces`|`@Produces`|`@Produces`|
|Assisted Injection|`@Assisted` & `@Argument`<sup>1</sup>|-|`@Assisted` & `@Argument`<sup>1</sup>|`@Assisted` & `@Argument`<sup>1</sup>|
|Indirection Injection|`Provider`|`Provider` & `Instance`|`Provider`|`Provider`|
|Indirect Injection|`Provider`|`Provider` & `Instance`|`Provider`|`Provider`|
|Collection Injection|`List` & `Set`|-|`List` & `Set`|`List` & `Set`|
|Proxy Support|Yes<sup>2</sup>|Yes<sup>2</sup>|Yes<sup>2</sup>|Yes<sup>2</sup>|

Expand All @@ -98,7 +98,7 @@ are extensions to support:

## Dependency Injection

Dependencies are other classes or types that are required for the correct functioning of another class. A
Dependencies are other classes or types that are required for the correct functioning of a class. A
dependency can be a class, an interface, a generic type or a primitive type. Dependency injection supplies
these required values automatically. Dependencies can be supplied through constructor or method parameters or
by setting fields directly.
Expand Down Expand Up @@ -491,7 +491,7 @@ Below an example of a class that implements the `Provider` interface and provide
public Connection get() { ... }
}

### `AssistedTypeRegistationExtension`
### `AssistedTypeRegistrationExtension`

Allows a type which has a single abstract method (a SAM type) with a non-void return type to act as a factory for the
returned type; any dependencies the produced type may have are injected by the injector, including the arguments
Expand Down Expand Up @@ -531,6 +531,14 @@ produced type. The following two examples would also allow constructing the `Gre
Greeter createGreeter(LocalTime timeOfDay);
}

Important note: in order for Dirk to match up the argument names, classes should be compiled with parameter name
information (use the `-parameters` flag for `javac`). Alternatively, the names can be explicitly specified with the
`@Argument` annotation:

abstract class GreeterFactory {
Greeter createGreeter(@Argument("timeOfDay") LocalTime timeOfDay);
}

# BSD License

Copyright (c) 2013-2022, John Hendrikx
Expand Down

0 comments on commit 95837eb

Please sign in to comment.