Skip to content

Commit a97d78f

Browse files
author
emmanue1
committed
Simplification
1 parent cb0dad6 commit a97d78f

File tree

3 files changed

+11
-21
lines changed

3 files changed

+11
-21
lines changed

src/main/java/org/jd/core/v1/model/javasyntax/expression/SuperExpression.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
/*
2-
* Copyright (c) 2008-2019 Emmanuel Dupuy.
2+
* Copyright (c) 2008, 2019 Emmanuel Dupuy.
33
* This project is distributed under the GPLv3 license.
44
* This is a Copyleft license that gives the user the right to use,
55
* copy and modify the code freely for non-commercial purposes.
66
*/
77

88
package org.jd.core.v1.model.javasyntax.expression;
99

10-
import org.jd.core.v1.model.javasyntax.type.ObjectType;
1110
import org.jd.core.v1.model.javasyntax.type.Type;
1211

1312
public class SuperExpression extends AbstractLineNumberExpression {
14-
protected ObjectType type;
13+
protected Type type;
1514

16-
public SuperExpression(ObjectType type) {
15+
public SuperExpression(Type type) {
1716
this.type = type;
1817
}
1918

20-
public SuperExpression(int lineNumber, ObjectType type) {
19+
public SuperExpression(int lineNumber, Type type) {
2120
super(lineNumber);
2221
this.type = type;
2322
}
2423

25-
public ObjectType getObjectType() {
26-
return type;
27-
}
28-
2924
@Override
3025
public Type getType() {
3126
return type;

src/main/java/org/jd/core/v1/model/javasyntax/expression/ThisExpression.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
/*
2-
* Copyright (c) 2008-2019 Emmanuel Dupuy.
2+
* Copyright (c) 2008, 2019 Emmanuel Dupuy.
33
* This project is distributed under the GPLv3 license.
44
* This is a Copyleft license that gives the user the right to use,
55
* copy and modify the code freely for non-commercial purposes.
66
*/
77

88
package org.jd.core.v1.model.javasyntax.expression;
99

10-
import org.jd.core.v1.model.javasyntax.type.ObjectType;
1110
import org.jd.core.v1.model.javasyntax.type.Type;
1211

1312
public class ThisExpression extends AbstractLineNumberExpression {
14-
protected ObjectType type;
13+
protected Type type;
1514
protected boolean explicit;
1615

17-
public ThisExpression(ObjectType type) {
16+
public ThisExpression(Type type) {
1817
this.type = type;
1918
this.explicit = true;
2019
}
2120

22-
public ThisExpression(int lineNumber, ObjectType type) {
21+
public ThisExpression(int lineNumber, Type type) {
2322
super(lineNumber);
2423
this.type = type;
2524
this.explicit = true;
2625
}
2726

28-
public ObjectType getObjectType() {
29-
return type;
30-
}
31-
3227
@Override
3328
public Type getType() {
3429
return type;

src/main/java/org/jd/core/v1/service/converter/classfiletojavasyntax/util/StatementMaker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ protected Expression createObjectTypeReferenceDotClassExpression(int lineNumber,
880880

881881
for (ClassFileFieldDeclaration field : bodyDeclaration.getFieldDeclarations()) {
882882
field.getFieldDeclarators().accept(memberVisitor);
883-
if (memberVisitor.isFound()) {
883+
if (memberVisitor.found()) {
884884
field.setFlags(field.getFlags() | Constants.ACC_SYNTHETIC);
885885
break;
886886
}
@@ -891,7 +891,7 @@ protected Expression createObjectTypeReferenceDotClassExpression(int lineNumber,
891891

892892
for (ClassFileConstructorOrMethodDeclaration member : bodyDeclaration.getMethodDeclarations()) {
893893
member.accept(memberVisitor);
894-
if (memberVisitor.isFound()) {
894+
if (memberVisitor.found()) {
895895
member.setFlags(member.getFlags() | Constants.ACC_SYNTHETIC);
896896
break;
897897
}
@@ -964,7 +964,7 @@ public void init(String name) {
964964
this.found = false;
965965
}
966966

967-
public boolean isFound() {
967+
public boolean found() {
968968
return found;
969969
}
970970

0 commit comments

Comments
 (0)