@@ -8,11 +8,13 @@ private import CaptureModels
8
8
* A type representing instantiations of class types
9
9
* that has a method which returns an iterator.
10
10
*/
11
- private class IterableType extends Class {
11
+ private class IterableClass extends Class {
12
12
private Type elementType ;
13
13
14
- IterableType ( ) {
15
- exists ( Method m , RefType return , GenericType t , Type et , int position | m .getDeclaringType ( ) = t |
14
+ IterableClass ( ) {
15
+ exists ( Method m , RefType return , GenericType t , Type et , int position |
16
+ m .getDeclaringType ( ) = t
17
+ |
16
18
return = m .getReturnType ( ) and
17
19
return .getSourceDeclaration ( ) .hasQualifiedName ( "java.util" , "Iterator" ) and
18
20
et = return .( ParameterizedType ) .getTypeArgument ( 0 ) and
@@ -51,7 +53,7 @@ private predicate genericContainerType(RefType t, TypeVariable tv) {
51
53
exists ( Type et |
52
54
et =
53
55
[
54
- t .( ContainerType ) .getElementType ( ) , t .( IterableType ) .getElementType ( ) ,
56
+ t .( ContainerType ) .getElementType ( ) , t .( IterableClass ) .getElementType ( ) ,
55
57
t .( Array ) .getElementType ( )
56
58
]
57
59
|
@@ -83,7 +85,7 @@ private string getAccessPath(Type t) {
83
85
not Specific:: isPrimitiveTypeUsedForBulkData ( t .( Array ) .getElementType ( ) )
84
86
then result = ".ArrayElement"
85
87
else
86
- if t instanceof ContainerType or t instanceof IterableType
88
+ if t instanceof ContainerType or t instanceof IterableClass
87
89
then result = ".Element"
88
90
else result = ""
89
91
}
0 commit comments