File tree Expand file tree Collapse file tree 4 files changed +38
-1
lines changed
kotlin-extractor/src/main/kotlin
ql/test/kotlin/library-tests/enum Expand file tree Collapse file tree 4 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,11 @@ open class KotlinUsesExtractor(
8585 makeDescription(StandardNames .FqNames .map, " <get-entries>" ) to " entrySet" ,
8686 makeDescription(FqName (" java.util.Map" ), " <get-entries>" ) to " entrySet" ,
8787 makeDescription(StandardNames .FqNames .mutableList, " removeAt" ) to " remove" ,
88- makeDescription(FqName (" java.util.List" ), " removeAt" ) to " remove"
88+ makeDescription(FqName (" java.util.List" ), " removeAt" ) to " remove" ,
89+ makeDescription(StandardNames .FqNames ._enum .toSafe(), " <get-ordinal>" ) to " ordinal" ,
90+ makeDescription(FqName (" java.lang.Enum" ), " <get-ordinal>" ) to " ordinal" ,
91+ makeDescription(StandardNames .FqNames ._enum .toSafe(), " <get-name>" ) to " name" ,
92+ makeDescription(FqName (" java.lang.Enum" ), " <get-name>" ) to " name" ,
8993 )
9094
9195 private val specialFunctionShortNames = specialFunctions.keys.map { it.functionName }.toSet()
Original file line number Diff line number Diff line change 1+ fun usesEnum (e : Enum <* >) = e.ordinal.toString() + e.name
Original file line number Diff line number Diff line change 1+ | addAll |
2+ | addRange |
3+ | allOf |
4+ | asIterator |
5+ | clone |
6+ | compareTo |
7+ | complement |
8+ | complementOf |
9+ | copyOf |
10+ | describeConstable |
11+ | equals |
12+ | finalize |
13+ | getDeclaringClass |
14+ | hasMoreElements |
15+ | hashCode |
16+ | name |
17+ | nextElement |
18+ | noneOf |
19+ | of |
20+ | ordinal |
21+ | range |
22+ | resolveConstantDesc |
23+ | toString |
24+ | typeCheck |
25+ | usesEnum |
26+ | valueOf |
27+ | writeReplace |
Original file line number Diff line number Diff line change 1+ import java
2+
3+ from Method m
4+ where m .getDeclaringType ( ) .getName ( ) .matches ( "Enum%" )
5+ select m .getName ( )
You can’t perform that action at this time.
0 commit comments