mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
46 lines
1009 B
HTML
46 lines
1009 B
HTML
<html>
|
|
<body>
|
|
Reports the <code>inner</code> modifier on a class as redundant if it doesn't reference members of its outer class.
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class Foo {
|
|
<b>inner</b> class InnerClass { // redundant `inner` modifier
|
|
fun hello() {
|
|
println("Hi!")
|
|
}
|
|
}
|
|
}
|
|
|
|
class List {
|
|
val objects = Array<Any>(42) { Any() }
|
|
|
|
<b>inner</b> class Iterator { // Not redundant `inner` modifier
|
|
fun next(): Any {
|
|
return objects[0]
|
|
}
|
|
}
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
class Foo {
|
|
class InnerClass { // redundant `inner` modifier
|
|
fun hello() {
|
|
println("Hi!")
|
|
}
|
|
}
|
|
}
|
|
|
|
class List {
|
|
val objects = Array<Any>(42) { Any() }
|
|
|
|
<b>inner</b> class Iterator { // Not redundant `inner` modifier
|
|
fun next(): Any {
|
|
return objects[0]
|
|
}
|
|
}
|
|
}
|
|
</code></pre>
|
|
</body>
|
|
</html>
|