Skip to content

Commit 91aa75d

Browse files
committed
Java: Rename IterableType to IterableClass.
1 parent ce8ab0e commit 91aa75d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

java/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ private import CaptureModels
88
* A type representing instantiations of class types
99
* that has a method which returns an iterator.
1010
*/
11-
private class IterableType extends Class {
11+
private class IterableClass extends Class {
1212
private Type elementType;
1313

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+
|
1618
return = m.getReturnType() and
1719
return.getSourceDeclaration().hasQualifiedName("java.util", "Iterator") and
1820
et = return.(ParameterizedType).getTypeArgument(0) and
@@ -51,7 +53,7 @@ private predicate genericContainerType(RefType t, TypeVariable tv) {
5153
exists(Type et |
5254
et =
5355
[
54-
t.(ContainerType).getElementType(), t.(IterableType).getElementType(),
56+
t.(ContainerType).getElementType(), t.(IterableClass).getElementType(),
5557
t.(Array).getElementType()
5658
]
5759
|
@@ -83,7 +85,7 @@ private string getAccessPath(Type t) {
8385
not Specific::isPrimitiveTypeUsedForBulkData(t.(Array).getElementType())
8486
then result = ".ArrayElement"
8587
else
86-
if t instanceof ContainerType or t instanceof IterableType
88+
if t instanceof ContainerType or t instanceof IterableClass
8789
then result = ".Element"
8890
else result = ""
8991
}

0 commit comments

Comments
 (0)