Reuse Java usage types
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
Class/object property type (2: 15) var next: A? = A()
|
||||
Function return types (15: 20) fun getNext(): A? {
|
||||
Function return types (36: 16) fun Any.toA(): A? {
|
||||
Instantiation (2: 20) var next: A? = A()
|
||||
Instantiation (32: 18) fun X.bar(a: A = A()) {
|
||||
Local variable type (11: 17) val aa: A = a
|
||||
Local variable declaration (11: 17) val aa: A = a
|
||||
New instance creation (2: 20) var next: A? = A()
|
||||
New instance creation (32: 18) fun X.bar(a: A = A()) {
|
||||
Parameter type (10: 16) fun foo(a: A) {
|
||||
Parameter type (32: 14) fun X.bar(a: A = A()) {
|
||||
Super type qualifier (20: 15) super<A>.foo()
|
||||
Supertype (1: 39) public class X(bar: String? = A.BAR): A() {
|
||||
Supertype (23: 19) class object: A() {
|
||||
Supertype (28: 11) object O: A() {
|
||||
Target type of 'as' operation (37: 35) return if (this is A) this as A else null
|
||||
Target type of 'is' operation (37: 24) return if (this is A) this as A else null
|
||||
Unclassified usage (1: 31) public class X(bar: String? = A.BAR): A() {
|
||||
Unclassified usage (3: 26) val myBar: String? = A.BAR
|
||||
Unclassified usage (6: 9) A.BAR = ""
|
||||
Unclassified usage (7: 9) A.foos()
|
||||
Usage in cast target type (37: 35) return if (this is A) this as A else null
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
Class/object property type (6: 21) var nextServer: Server? = new Server()
|
||||
Function return types (14: 26) fun getNextServer(): Server? {
|
||||
Function return types (40: 21) fun Any.asServer(): Server? {
|
||||
Import directive (3: 15) import server.Server
|
||||
Local variable type (10: 21) val server: Server = s
|
||||
Local variable declaration (10: 21) val server: Server = s
|
||||
Nested class/object (32: 28) fun Client.bar(s: Server = Server.NAME) {
|
||||
Nested class/object (5: 29) class Client(name: String = Server.NAME): Server() {
|
||||
Nested class/object (7: 16) val name = Server.NAME
|
||||
@@ -12,5 +11,6 @@ Super type qualifier (19: 15) super<Server>.work()
|
||||
Supertype (23: 19) class object: Server() {
|
||||
Supertype (28: 22) object ClientObject: Server() {
|
||||
Supertype (5: 43) class Client(name: String = Server.NAME): Server() {
|
||||
Target type of 'as' operation (41: 40) return if (this is Server) this as Server else null
|
||||
Target type of 'is' operation (41: 24) return if (this is Server) this as Server else null
|
||||
Usage in cast target type (41: 40) return if (this is Server) this as Server else null
|
||||
Usage in import (3: 15) import server.Server
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Annotation (5: 1) X("")
|
||||
Import directive (3: 15) import server.X
|
||||
Usage in import (3: 15) import server.X
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Import directive (3: 15) import server.Data
|
||||
Type argument (9: 16) val c = Client<Data>()
|
||||
Type constraint (5: 17) class Client<T: Data, X> where X: Data {
|
||||
Type constraint (5: 35) class Client<T: Data, X> where X: Data {
|
||||
Type constraint (5: 35) class Client<T: Data, X> where X: Data {
|
||||
Type parameter (9: 16) val c = Client<Data>()
|
||||
Usage in import (3: 15) import server.Data
|
||||
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
Class/object property type (6: 21) var nextServer: Server? = new Server()
|
||||
Function return types (14: 26) fun getNextServer(): Server? {
|
||||
Function return types (36: 21) fun Any.asServer(): Server? {
|
||||
Import directive (3: 15) import server.Server
|
||||
Local variable type (10: 21) val server: Server = s
|
||||
Local variable declaration (10: 21) val server: Server = s
|
||||
Nested class/object (28: 28) fun Client.bar(s: Server = Server.NAME) {
|
||||
Nested class/object (5: 29) class Client(name: String = Server.NAME): Server() {
|
||||
Nested class/object (7: 16) val name = Server.NAME
|
||||
Parameter type (28: 19) fun Client.bar(s: Server = Server.NAME) {
|
||||
Parameter type (9: 16) fun foo(s: Server) {
|
||||
Super type qualifier (19: 15) super<Server>.work()
|
||||
Target type of 'as' operation (37: 40) return if (this is Server) this as Server else null
|
||||
Target type of 'is' operation (37: 24) return if (this is Server) this as Server else null
|
||||
Usage in cast target type (37: 40) return if (this is Server) this as Server else null
|
||||
Usage in import (3: 15) import server.Server
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
Instantiation (6: 12) return Bar()
|
||||
|
||||
New instance creation (6: 12) return Bar()
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
Instantiation (7: 16) return Bar()
|
||||
|
||||
New instance creation (7: 16) return Bar()
|
||||
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
Instantiation (10: 33) open fun processRequest() = Foo()
|
||||
Instantiation (14: 44) override fun processRequest() = Server.Foo()
|
||||
Instantiation (5: 24) println(Server.Foo())
|
||||
New instance creation (10: 33) open fun processRequest() = Foo()
|
||||
New instance creation (14: 44) override fun processRequest() = Server.Foo()
|
||||
New instance creation (5: 24) println(Server.Foo())
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
Callable reference (6: 23) val methodRef = ::processRequest()
|
||||
Function call (10: 9) processRequest()
|
||||
Import directive (3: 15) import server.processRequest
|
||||
Unclassified usage (6: 30) String s = ServerPackage.processRequest();
|
||||
Unclassified usage (9: 30) return ServerPackage.processRequest();
|
||||
Usage in import (3: 15) import server.processRequest
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Import directive (3: 15) import server.O
|
||||
Receiver (7: 26) println("foo = ${O.foo}")
|
||||
Value read (8: 19) val obj = O
|
||||
Usage in import (3: 15) import server.O
|
||||
Value read (8: 19) val obj = O
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Import directive (3: 15) import server.foo
|
||||
Receiver (8: 35) println("length: ${server.foo.length()}")
|
||||
Unclassified usage (7: 53) System.out.println("foo = " + ServerPackage.getFoo());
|
||||
Unclassified usage (8: 55) System.out.println("length: " + ServerPackage.getFoo().length());
|
||||
Unclassified usage (9: 23) ServerPackage.setFoo("");
|
||||
Usage in import (3: 15) import server.foo
|
||||
Value read (7: 33) println("foo = ${server.foo}")
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Instantiation (5: 9) val a = Test()
|
||||
New instance creation (5: 9) val a = Test()
|
||||
|
||||
Reference in New Issue
Block a user