Skip to content

Commit

Permalink
moditect#28 Documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarmorling committed Jan 20, 2019
1 parent b8e9484 commit 8473ba0
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,34 +58,50 @@ Deptective can be used with any Java build system such as Maven, Gradle etc.

```
{
"packages" : [
"components" : [
{
"name" : "com.example.foo",
"name" : "ui",
"contains" : [ "com.example.ui" ],
"reads" : [
"com.example.bar",
"com.example.baz"
"persistence",
"service"
]
},
{
"name" : "com.example.bar",
"name" : "persistence",
"contains" : [ "com.example.persistence" ]
},
{
"name" : "service",
"contains" : [ "com.example.service" ],
"reads" : [
"persistence"
]
},
{
"name" : "rest",
"contains" : [ "com.example.rest" ],
"reads" : [
"com.example.baz"
"persistence",
"service"
]
}
],
"whitelisted" : [
"java.util*",
"java.swing*"
"java.io*",
"java.util*"
]
}
```

`packages` is a list of `Package` objects.
The `Package` object has a `name` property (fully-qualified name of the described package)
and a `reads` property (list of strings representing the fully-qualified names of other packages read by the given package).
`components` is a list of `Component` objects.
The `Component` object has the following properties:
* `name`: a logical name of the component
* `contains`: a list of packages contained in the component (the `*` character can be used as a wildcard)
* `reads`: list of other components that may be accessed by this component

`whitelisted` is a list of strings representing whitelisted packages,
i.e. packages that always can be read by any other package.
i.e. packages that always can be read by any other component.
The `*` character can be used as a wildcard, so e.g. `java.util*` will whitelist the packages `java.util`, `java.util.concurrent` etc.

_Note:_ access to the package `java.lang` is always allowed.
Expand Down

0 comments on commit 8473ba0

Please sign in to comment.