Skip to content

Commit 9854f92

Browse files
authored
Merge pull request #3 from JavaWebStack/progress
Added make to injector reference and added modules docs
2 parents 62e4334 + 7a131f6 commit 9854f92

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

‎docs/framework/injector/reference.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Method | Description
44
------------------------------------------------------- | ------------------------------------------------------
55
`inject(Object object)` | Injects fields in the given object
6+
`make(Class type)` | Instantiate new instance for the given type
67
`getInstance(Class type)` | Returns the default instance for the given type
78
`getInstance(Class type, String name)` | Returns the named instance for the given type and name
89
`setInstance(Class type, Object instance)` | Sets the default instance for the given type

‎docs/framework/modules.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Modules
2+
3+
Modules provide a way to extend parts of your applications without the need of adding these one by one.
4+
5+
## Writing Modules
6+
7+
A module just needs to implement the `Module` interface, like in the following example:
8+
9+
```java
10+
public class ExampleModule implements Module {
11+
// overwrite methods of the interface
12+
}
13+
```
14+
15+
## Usage
16+
17+
```java
18+
public class ExampleApp extends WebApplication {
19+
protected void setupModules() {
20+
addModule(new ExampleModule());
21+
}
22+
}
23+
```
24+
25+
## Community Modules
26+
27+
- [JWS-GraphQL](https://github.com/x7airworker/JWS-GraphQL)

‎mkdocs.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ nav:
1919
- Framework:
2020
- 'framework/index.md'
2121
- 'framework/model-binding.md'
22+
- 'framework/modules.md'
2223
- ORM:
2324
- 'framework/orm/index.md'
2425
- 'framework/orm/getting-started.md'
@@ -48,4 +49,4 @@ nav:
4849
- HTTP-Client:
4950
- 'httpclient/index.md'
5051
- 'httpclient/reference.md'
51-
- 'httpclient/api-client.md'
52+
- 'httpclient/api-client.md'

0 commit comments

Comments
 (0)