Create from usage: Renamed all references of 'method' to 'function'.

This commit is contained in:
Jack Zhou
2013-05-01 17:58:25 -04:00
parent d2ce58e912
commit ec15d5fee4
52 changed files with 114 additions and 112 deletions
@@ -1,9 +1,9 @@
// "Create method 'component3' from usage" "true"
// "Create function 'component3' from usage" "true"
class Foo<T> {
fun component1(): Int { return 0 }
fun component2(): Int { return 0 }
fun component3(): Any {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun foo() {
@@ -1,9 +1,9 @@
// "Create method 'component3' from usage" "true"
// "Create function 'component3' from usage" "true"
class Foo<T> {
fun component1(): Int { return 0 }
fun component2(): Int { return 0 }
fun component3(): String {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun foo() {
@@ -1,4 +1,4 @@
// "Create method 'component3' from usage" "true"
// "Create function 'component3' from usage" "true"
class Foo<T> {
fun component1(): Int { return 0 }
fun component2(): Int { return 0 }
@@ -1,4 +1,4 @@
// "Create method 'component3' from usage" "true"
// "Create function 'component3' from usage" "true"
class Foo<T> {
fun component1(): Int { return 0 }
fun component2(): Int { return 0 }
@@ -1,9 +1,9 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T> {
fun x (y: Foo<Iterable<T>>) {
val z: Iterable<T> = y[""]
}
fun get(s: String): T {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,9 +1,9 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T> {
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
val z: Iterable<T> = y["", w]
}
fun get(s: String, w: T): T {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,7 +1,7 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T> {
fun get(s: String, w: T): T {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
@@ -1,7 +1,7 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T> {
fun get(s: String, w: T): Any {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
import java.util.ArrayList
class Foo<T> {
@@ -8,6 +8,6 @@ class Foo<T> {
bar(z)
}
fun <V> get(s: String, w: ArrayList<V>): String {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,7 +1,7 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
fun x (y: Any) {
val z: Any = y[""]
}
fun Any.get(s: String): Any {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -1,9 +1,9 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T> {
fun <S> x (y: Foo<Iterable<S>>) {
val z: Iterable<S> = y[""]
}
fun get(s: String): T {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,9 +1,9 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T, S: Iterable<T>> {
fun <U> x (y: Foo<U, Iterable<U>>) {
val z: U = y[""]
}
fun get(s: String): T {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,9 +1,9 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T> {
fun <T, V> x (y: Foo<Iterable<T>>, w: Iterable<V>) {
val z: Iterable<T> = y["", w]
}
fun <V> get(s: String, w: Iterable<V>): T {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
import java.util.ArrayList
class Foo<T> {
@@ -7,5 +7,5 @@ class Foo<T> {
}
}
fun <E, V> ArrayList<E>.get(s: String, w: ArrayList<V>): Boolean {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
import java.util.ArrayList
class Foo<T> {
@@ -6,6 +6,6 @@ class Foo<T> {
val z: Iterable<T> = y["", w]
}
fun <V> get(s: String, w: ArrayList<V>): T {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
import java.util.ArrayList
class Foo<T> {
@@ -6,6 +6,6 @@ class Foo<T> {
val z: Iterable<T> = y["", w]
}
fun get(s: String, w: T): T {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
import java.util.ArrayList
class Foo<S> {
@@ -6,6 +6,6 @@ class Foo<S> {
val z: Iterable<T> = y["", w]
}
fun get(s: String, w: S): S {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T> {
fun x (y: Foo<Iterable<T>>) {
val z: Iterable<T> = y<caret>[""]
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T> {
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
val z: Iterable<T> = y<caret>["", w]
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T>
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
val z: Iterable<T> = y<caret>["", w]
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T>
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
val z = y<caret>["", w]
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
import java.util.ArrayList
class Foo<T> {
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
fun x (y: Any) {
val z: Any = y<caret>[""]
}
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T> {
fun <S> x (y: Foo<Iterable<S>>) {
val z: Iterable<S> = y<caret>[""]
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T, S: Iterable<T>> {
fun <U> x (y: Foo<U, Iterable<U>>) {
val z: U = y<caret>[""]
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T> {
fun <T, V> x (y: Foo<Iterable<T>>, w: Iterable<V>) {
val z: Iterable<T> = y<caret>["", w]
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
class Foo<T> {
fun <T, V> x (y: java.util.ArrayList<T>, w: java.util.ArrayList<V>) {
val z: java.util.ArrayList<T>? = if (y<caret>["", w]) null else null
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
import java.util.ArrayList
class Foo<T> {
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
import java.util.ArrayList
class Foo<T> {
@@ -1,4 +1,4 @@
// "Create method 'get' from usage" "true"
// "Create function 'get' from usage" "true"
import java.util.ArrayList
class Foo<S> {
@@ -1,10 +1,10 @@
// "Create method 'hasNext' from usage" "true"
// "Create function 'hasNext' from usage" "true"
class FooIterator<T> {
fun next(): Int {
throw Exception("not implemented")
}
fun hasNext(): Boolean {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
class Foo<T> {
@@ -1,10 +1,10 @@
// "Create method 'hasNext' from usage" "true"
// "Create function 'hasNext' from usage" "true"
class FooIterator<T> {
fun next(): T {
throw Exception("not implemented")
}
fun hasNext(): Boolean {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
class Foo<T> {
@@ -1,4 +1,4 @@
// "Create method 'hasNext' from usage" "true"
// "Create function 'hasNext' from usage" "true"
class FooIterator<T> {
fun next(): Int {
throw Exception("not implemented")
@@ -1,4 +1,4 @@
// "Create method 'hasNext' from usage" "true"
// "Create function 'hasNext' from usage" "true"
class FooIterator<T> {
fun next(): T {
throw Exception("not implemented")
@@ -1,7 +1,7 @@
// "Create method 'iterator' from usage" "true"
// "Create function 'iterator' from usage" "true"
class Foo<T> {
fun iterator(): Iterator<T> {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun foo() {
@@ -1,7 +1,7 @@
// "Create method 'iterator' from usage" "true"
// "Create function 'iterator' from usage" "true"
class Foo<T> {
fun iterator(): Iterator<String> {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun foo() {
@@ -1,4 +1,4 @@
// "Create method 'iterator' from usage" "true"
// "Create function 'iterator' from usage" "true"
class Foo<T>
fun foo() {
for (i: Int in Foo<caret><Int>()) { }
@@ -1,4 +1,4 @@
// "Create method 'iterator' from usage" "true"
// "Create function 'iterator' from usage" "true"
class Foo<T>
fun foo() {
for (i in Foo<caret><Int>()) {
@@ -1,8 +1,8 @@
// "Create method 'next' from usage" "true"
// "Create function 'next' from usage" "true"
class FooIterator<T> {
fun hasNext(): Boolean { return false }
fun next(): Int {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
class Foo<T> {
@@ -1,8 +1,8 @@
// "Create method 'next' from usage" "true"
// "Create function 'next' from usage" "true"
class FooIterator<T> {
fun hasNext(): Boolean { return false }
fun next(): T {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
class Foo<T> {
@@ -1,4 +1,4 @@
// "Create method 'next' from usage" "true"
// "Create function 'next' from usage" "true"
class FooIterator<T> {
fun hasNext(): Boolean { return false }
}
@@ -1,4 +1,4 @@
// "Create method 'next' from usage" "true"
// "Create function 'next' from usage" "true"
class FooIterator<T> {
fun hasNext(): Boolean { return false }
}
@@ -1,9 +1,9 @@
// "Create method 'set' from usage" "true"
// "Create function 'set' from usage" "true"
class Foo<T> {
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
y["", w] = w
}
fun set(s: String, w: T, value: T) {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,4 +1,4 @@
// "Create method 'set' from usage" "true"
// "Create function 'set' from usage" "true"
import java.util.ArrayList
class Foo<T> {
@@ -7,5 +7,5 @@ class Foo<T> {
}
}
fun <T> Any.set(s: String, w: ArrayList<T>, value: ArrayList<T>) {
throw UnsupportedOperationException("not implemented") //To change body of created methods use File | Settings | File Templates.
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -1,4 +1,4 @@
// "Create method 'set' from usage" "true"
// "Create function 'set' from usage" "true"
class Foo<T> {
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
y<caret>["", w] = w
@@ -1,4 +1,4 @@
// "Create method 'set' from usage" "true"
// "Create function 'set' from usage" "true"
class Foo<T> {
fun <T> x (y: Any, w: java.util.ArrayList<T>) {
y<caret>["", w] = w