Skip to content

Commit 5cfc47f

Browse files
committed
Clean up
1 parent ee5ecbc commit 5cfc47f

File tree

20 files changed

+259
-251
lines changed

20 files changed

+259
-251
lines changed

edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/CannotDetermineStreamOrderingException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ public CannotDetermineStreamOrderingException(Throwable cause, Class<?> sourceTy
2727
}
2828

2929
public Class<?> getSourceType() {
30-
return sourceType;
30+
return this.sourceType;
3131
}
3232
}

edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/CannotExtractSpliteratorException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ public CannotExtractSpliteratorException(Throwable cause) {
2828
}
2929

3030
public Class<? extends Object> getFromType() {
31-
return fromType;
31+
return this.fromType;
3232
}
3333
}

edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/NoninstantiableException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ public NoninstantiableException(String string, Throwable cause, Class<?> sourceT
1616
}
1717

1818
public Object getSourceType() {
19-
return sourceType;
19+
return this.sourceType;
2020
}
2121

2222
@Override
2323
public String toString() {
2424
StringBuilder builder = new StringBuilder();
2525
builder.append(super.toString() + ", ");
2626
builder.append("NoninstantiablePossibleStreamSourceException [sourceType=");
27-
builder.append(sourceType);
27+
builder.append(this.sourceType);
2828
builder.append("]");
2929
return builder.toString();
3030
}

edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/OrderingInference.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private Object createInstance(Class<?> clazz) throws NoninstantiableException {
3737
try {
3838
return clazz.newInstance();
3939
} catch (InstantiationException | IllegalAccessException e) {
40-
ObjectInstantiator<?> instantiator = objenesis.getInstantiatorOf(clazz);
40+
ObjectInstantiator<?> instantiator = this.objenesis.getInstantiatorOf(clazz);
4141
try {
4242
return instantiator.newInstance();
4343
} catch (InstantiationError e2) {
@@ -49,7 +49,7 @@ private Object createInstance(Class<?> clazz) throws NoninstantiableException {
4949
private String findStreamCreationMethod(Collection<TypeAbstraction> types) {
5050
// find the first one.
5151
for (TypeAbstraction typeAbstraction : types) {
52-
String methodName = findStreamCreationMethod(typeAbstraction);
52+
String methodName = this.findStreamCreationMethod(typeAbstraction);
5353

5454
if (methodName != null)
5555
return methodName;
@@ -73,11 +73,11 @@ private String findStreamCreationMethod(IClass type) {
7373

7474
private String findStreamCreationMethod(TypeAbstraction typeAbstraction) {
7575
IClass type = typeAbstraction.getType();
76-
return findStreamCreationMethod(type);
76+
return this.findStreamCreationMethod(type);
7777
}
7878

7979
protected IClassHierarchy getClassHierarchy() {
80-
return classHierarchy;
80+
return this.classHierarchy;
8181
}
8282

8383
private Spliterator<?> getSpliterator(Object instance, String calledMethodName)
@@ -126,21 +126,21 @@ Ordering inferOrdering(Collection<TypeAbstraction> possibleTypes) throws Inconsi
126126
if (possibleTypes.isEmpty())
127127
return null;
128128
else {
129-
String methodName = findStreamCreationMethod(possibleTypes);
129+
String methodName = this.findStreamCreationMethod(possibleTypes);
130130

131131
if (methodName == null) {
132132
LOGGER.warning(() -> "Can't find stream creation method for: " + possibleTypes);
133133
return null;
134134
}
135135

136-
return inferOrdering(possibleTypes, methodName);
136+
return this.inferOrdering(possibleTypes, methodName);
137137
}
138138
}
139139

140140
Ordering inferOrdering(Collection<TypeAbstraction> possibleTypes, IMethod calledMethod)
141141
throws InconsistentPossibleOrderingException, NoniterableException, NoninstantiableException,
142142
CannotExtractSpliteratorException {
143-
return inferOrdering(possibleTypes, calledMethod.getElementName());
143+
return this.inferOrdering(possibleTypes, calledMethod.getElementName());
144144
}
145145

146146
private Ordering inferOrdering(Collection<TypeAbstraction> possibleTypes, String calledMethodName)
@@ -150,7 +150,7 @@ private Ordering inferOrdering(Collection<TypeAbstraction> possibleTypes, String
150150

151151
for (TypeAbstraction typeAbstraction : possibleTypes) {
152152
if (typeAbstraction != TypeAbstraction.TOP) {
153-
Ordering ordering = inferOrdering(typeAbstraction, calledMethodName);
153+
Ordering ordering = this.inferOrdering(typeAbstraction, calledMethodName);
154154

155155
if (ret == null)
156156
ret = ordering;
@@ -172,10 +172,10 @@ private Ordering inferOrdering(String className, String calledMethodName)
172172

173173
// is it instantiable?
174174
if (!Util.isAbstractType(clazz)) {
175-
Object instance = createInstance(clazz);
175+
Object instance = this.createInstance(clazz);
176176
boolean ordered;
177177

178-
Spliterator<?> spliterator = getSpliterator(instance, calledMethodName);
178+
Spliterator<?> spliterator = this.getSpliterator(instance, calledMethodName);
179179

180180
if (spliterator == null) {
181181
LOGGER.warning("Can't extract spliterator. Defaulting to: " + Ordering.ORDERED);
@@ -217,6 +217,6 @@ private Ordering inferOrdering(TypeAbstraction type, String calledMethodName)
217217
return Ordering.ORDERED;
218218

219219
String binaryName = Util.getBinaryName(typeReference);
220-
return inferOrdering(binaryName, calledMethodName);
220+
return this.inferOrdering(binaryName, calledMethodName);
221221
}
222222
}

edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/analysis/PreconditionFailure.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ private PreconditionFailure(int code) {
4343
}
4444

4545
public int getCode() {
46-
return code;
46+
return this.code;
4747
}
4848
}

0 commit comments

Comments
 (0)