Skip to content

Commit

Permalink
Merge pull request #1 from xjtucoderesearch/main
Browse files Browse the repository at this point in the history
Merge main line
  • Loading branch information
thisrabbit authored May 5, 2022
2 parents d559951 + 0f8512b commit 967a147
Show file tree
Hide file tree
Showing 13 changed files with 711 additions and 96 deletions.
5 changes: 3 additions & 2 deletions docs/Statistic.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
"Import": 6,
"Override": 1,
"Set": 3,
"UseVar": 0,
"UseVar": 7,
"Typed": 2,
"Modify": 2,
"Reflect": 0
"Reflect": 5,
"Parameter": 2
}
}
53 changes: 53 additions & 0 deletions docs/dependency/Call.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,56 @@ relation:
dest: file0/getBar
category: Call
```
* Method call (multiple methods)
```java
// Foo.java
public class Foo {
public Bar getBar(){
Bar mBar = new Bar();
return mBar;
}

public void foo(){
getBar().bar();
}
}

class Bar extends Foo{
public void bar(){
/* ... */
}

public void getFoo(){
super.foo();
}
}
```

```yaml
name: Method Call Returned Method
entity:
items:
- name: Foo
category : Class
- name: Bar
category : Class
- name: foo
category : Method
qualifiedName: Foo.foo
- name: getBar
category : Method
qualifiedName: Foo.getBar
- name: bar
category : Method
qualifiedName: Bar.bar
- name: getFoo
category : Method
qualifiedName: Bar.getFoo
relation:
items:
- src: file0/getFoo
dest: file0/foo
category: Call
```
20 changes: 10 additions & 10 deletions docs/dependency/Contain.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ entity:
category : Class
relation:
items:
- src: Hello
dest: Hello/Class[0]
- src: file0
dest: file0/Class[0]
category: Contain
- src: Hello
dest: Hello/Class[1]
- src: file0
dest: file0/Class[1]
category: Contain
```
- File contains enum(s)
Expand All @@ -121,8 +121,8 @@ entity:
category : Enum
relation:
items:
- src: Hello
dest: Hello/Enum[0]
- src: file0
dest: file0/Enum[0]
category: Contain
```
- File contains interface(s)
Expand All @@ -143,8 +143,8 @@ entity:
category : Interface
relation:
items:
- src: Hello
dest: Hello/Interface[0]
- src: file0
dest: file0/Interface[0]
category: Contain
```
- File contains annotation(s)
Expand All @@ -165,7 +165,7 @@ entity:
category : Annotation
relation:
items:
- src: Hello
dest: Hello/Annotation[0]
- src: file0
dest: file0/Annotation[0]
category: Contain
```
32 changes: 16 additions & 16 deletions docs/dependency/Define.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ entity:
modifiers: public
relation:
items:
- src: BaseService/Class[0]
dest: BaseService/Method[0]
- src: file0/Class[0]
dest: file0/Method[0]
category: Define
```
- Define a method (interface)
Expand All @@ -72,8 +72,8 @@ entity:
category : Method
relation:
items:
- src: BaseService/Interface[0]
dest: BaseService/Method[0]
- src: file0/Interface[0]
dest: file0/Method[0]
category: Define
```
- Define a field (global variable)
Expand All @@ -99,8 +99,8 @@ entity:
modifiers: public static final
relation:
items:
- src: BaseService/Class[0]
dest: BaseService/Variable[0]
- src: file0/Class[0]
dest: file0/Variable[0]
category: Define
```
- Define a variable (local variable)
Expand Down Expand Up @@ -133,8 +133,8 @@ entity:
rawType: String
relation:
items:
- src: BaseService/Method[0]
dest: BaseService/Variable[1]
- src: file0/Method[0]
dest: file0/Variable[1]
category: Define
```
- Define an enum constant
Expand Down Expand Up @@ -166,11 +166,11 @@ entity:
category : Enum Constant
relation:
items:
- src: AttachmentType/Enum[0]
dest: AttachmentType/Enum Constant[0]
- src: file0/Enum[0]
dest: file0/Enum Constant[0]
category: Define
- src: AttachmentType/Enum[0]
dest: AttachmentType/Enum Constant[1]
- src: file0/Enum[0]
dest: file0/Enum Constant[1]
category: Define
```
- Define an annotation member
Expand Down Expand Up @@ -219,10 +219,10 @@ entity:
loc: [ 25, 4, 26, 33 ]
relation:
items:
- src: DisableOnCondition/Annotation[0]
dest: DisableOnCondition/Annotation Member[0]
- src: file0/Annotation[0]
dest: file0/Annotation Member[0]
category: Define
- src: DisableOnCondition/Enum[0]
dest: DisableOnCondition/Annotation Member[1]
- src: file0/Enum[0]
dest: file0/Annotation Member[1]
category: Define
```
24 changes: 12 additions & 12 deletions docs/dependency/Implement.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ entity:
modifiers: public
relation:
items:
- src: BaseService/Class[0]
dest: Bed/Interface[0]
- src: file0/Class[0]
dest: file1/Interface[0]
category: implement
```
- An enum implements an interface
Expand Down Expand Up @@ -77,8 +77,8 @@ entity:
modifiers: public
relation:
items:
- src: BaseService/Enum[0]
dest: Bed/Interface[0]
- src: file0/Enum[0]
dest: file1/Interface[0]
category: implement
```
- A class implements multiple interfaces
Expand Down Expand Up @@ -121,11 +121,11 @@ entity:
modifiers: public
relation:
items:
- src: BaseService/Class[0]
dest: Photo/Interface[0]
- src: file0/Class[0]
dest: file1/Interface[0]
category: implement
- src: BaseService/Class[0]
dest: Drink/Interface[0]
- src: file0/Class[0]
dest: file2/Interface[0]
category: implement
```
- An enum implements multiple interfaces
Expand Down Expand Up @@ -168,10 +168,10 @@ entity:
modifiers: public
relation:
items:
- src: BaseService/Enum[0]
dest: Photo/Interface[0]
- src: file0/Enum[0]
dest: file1/Interface[0]
category: implement
- src: BaseService/Enum[0]
dest: Drink/Interface[0]
- src: file0/Enum[0]
dest: file2/Interface[0]
category: implement
```
30 changes: 13 additions & 17 deletions docs/dependency/Inherit.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class InMemoryCacheStore extends AbstractStringCacheStore {
```
```java
//AbstractStringCacheStore.java
public abstract class AbstractStringCacheStore extends AbstractCacheStore<String, String> {
public abstract class AbstractStringCacheStore {

}
```
Expand All @@ -36,16 +36,14 @@ entity:
category : Class
qualifiedName: InMemoryCacheStore
modifiers: public
File: InMemoryCacheStore.java
- name: AbstractStringCacheStore
category : Class
qualifiedName: AbstractStringCacheStore
modifiers: public abstract
File: AbstractStringCacheStore.java
relation:
items:
- src: InMemoryCacheStore/Class[0]
dest: AbstractStringCacheStore/Class[0]
- src: file0/Class[0]
dest: file1/Class[0]
category: inherit
```
- Class extends one parameterized type
Expand All @@ -57,7 +55,7 @@ public abstract class AbstractStringCacheStore extends AbstractCacheStore<String
```
```java
//AbstractCacheStore.java
public abstract class AbstractCacheStore<K, V> implements CacheStore<K, V> {
public abstract class AbstractCacheStore<K, V> {

}
```
Expand All @@ -69,16 +67,14 @@ entity:
category : Class
qualifiedName: AbstractCacheStore
modifiers: public abstract
File: InMemoryCacheStore.java
- name: AbstractStringCacheStore
category : Class
qualifiedName: AbstractStringCacheStore
modifiers: public abstract
File: AbstractStringCacheStore.java
relation:
items:
- src: AbstractStringCacheStore/Class[0]
dest: AbstractCacheStore/Class[0]
- src: file0/Class[0]
dest: file1/Class[0]
category: inherit
```
- Interface extends one super interface
Expand Down Expand Up @@ -108,14 +104,14 @@ entity:
modifiers: public
relation:
items:
- src: JournalService/Interface[0]
dest: CrudService/Interface[0]
- src: file0/Interface[0]
dest: file1/Interface[0]
category: inherit
```
- Interface extends multiple super interfaces
```java
//JournalService.java
public interface JournalService extends CrudService<Journal, Integer>, BaseService {
public interface JournalService extends CrudService<String, Integer>, BaseService {

}
```
Expand Down Expand Up @@ -146,10 +142,10 @@ entity:
modifiers: public
relation:
items:
- src: JournalService/Interface[0]
dest: CrudService/Interface[0]
- src: file0/Interface[0]
dest: file1/Interface[0]
category: inherit
- src: JournalService/Interface[0]
dest: BaseService/Interface[0]
- src: file0/Interface[0]
dest: file2/Interface[0]
category: inherit
```
18 changes: 9 additions & 9 deletions docs/dependency/Modify.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A variable, which is just set a value before, is modified by a method.
name : Modify
```
### Syntax :
```yaml
```text
Assignment:
class var = some_value;
var = value;
Expand All @@ -24,7 +24,7 @@ public class Foo{
```
```yaml
name: Modify Field
entities:
entity:
items:
- name: Foo
category : Class
Expand All @@ -34,10 +34,10 @@ entities:
- name: changeType
category : Method
qualifiedName: Foo.changeType
dependencies:
relation:
items:
- src: Foo/Method[0]
dest: Foo/Variable[0]
- src: file0/Method[0]
dest: file0/Variable[0]
category: Modify
```
- Modify Local Var
Expand All @@ -58,7 +58,7 @@ public class Foo{
```
```yaml
name: Modify Local Var
entities:
entity:
items:
- name: Foo
category : Class
Expand All @@ -68,9 +68,9 @@ entities:
- name: changeType
category : Method
qualifiedName: Foo.changeType
dependencies:
relation:
items:
- src: Foo/Method[0]
dest: Foo/Variable[0]
- src: file0/Method[0]
dest: file0/Variable[0]
category: Modify
```
Loading

0 comments on commit 967a147

Please sign in to comment.