Skip to content

Commit 5cccf13

Browse files
author
emmanue1
committed
Refactoring : rename 'UnknownTypeArgument' to 'WildcardTypeArgument'
1 parent e80f641 commit 5cccf13

File tree

7 files changed

+17
-12
lines changed

7 files changed

+17
-12
lines changed

src/main/java/org/jd/core/v1/model/javasyntax/type/AbstractNopTypeVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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.
@@ -21,5 +21,5 @@ public abstract class AbstractNopTypeVisitor implements TypeVisitor {
2121
@Override public void visit(TypeParameterWithTypeBounds type) {}
2222
@Override public void visit(TypeParameters types) {}
2323
@Override public void visit(GenericType type) {}
24-
@Override public void visit(UnknownTypeArgument type) {}
24+
@Override public void visit(WildcardTypeArgument type) {}
2525
}

src/main/java/org/jd/core/v1/model/javasyntax/type/AbstractTypeVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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.
@@ -81,7 +81,7 @@ public void visit(TypeParameters list) {
8181
public void visit(GenericType type) {}
8282

8383
@Override
84-
public void visit(UnknownTypeArgument type) {}
84+
public void visit(WildcardTypeArgument type) {}
8585

8686
protected void safeAccept(TypeVisitable type) {
8787
if (type != null)

src/main/java/org/jd/core/v1/model/javasyntax/type/TypeVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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.
@@ -21,5 +21,5 @@ public interface TypeVisitor {
2121
void visit(TypeParameters types);
2222
void visit(WildcardSuperTypeArgument type);
2323
void visit(GenericType type);
24-
void visit(UnknownTypeArgument type);
24+
void visit(WildcardTypeArgument type);
2525
}

src/main/java/org/jd/core/v1/model/javasyntax/type/UnknownTypeArgument.java renamed to src/main/java/org/jd/core/v1/model/javasyntax/type/WildcardTypeArgument.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
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.type;
99

10-
public class UnknownTypeArgument implements TypeArgument {
10+
public class WildcardTypeArgument implements TypeArgument {
1111

1212
@Override
1313
public void accept(TypeVisitor visitor) {
1414
visitor.visit(this);
1515
}
16+
17+
@Override
18+
public String toString() {
19+
return "Wildcard{?}";
20+
}
1621
}

src/main/java/org/jd/core/v1/service/converter/classfiletojavasyntax/model/localvariable/Frame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ protected void generate(Type type) {
856856
@Override public void visit(TypeParameterWithTypeBounds type) {}
857857
@Override public void visit(TypeParameters types) {}
858858
@Override public void visit(WildcardSuperTypeArgument type) {}
859-
@Override public void visit(UnknownTypeArgument type) {}
859+
@Override public void visit(WildcardTypeArgument type) {}
860860
}
861861

862862
protected static class AbstractLocalVariableComparator implements Comparator<AbstractLocalVariable> {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* http://www.angelikalanger.com/GenericsFAQ/JavaGenericsFAQ.html
2828
*/
2929
public class SignatureParser {
30-
protected static final UnknownTypeArgument UNKNOWN_TYPE_ARGUMENT = new UnknownTypeArgument();
30+
protected static final WildcardTypeArgument WILDCARD_TYPE_ARGUMENT = new WildcardTypeArgument();
3131

3232
protected HashMap<String, MethodTypes> methodTypesCache = new HashMap<>(1024);
3333
protected HashMap<String, Type> typeCache = new HashMap<>(1024);
@@ -681,7 +681,7 @@ protected TypeArgument parseTypeArgument(SignatureReader reader) {
681681
case '-':
682682
return new WildcardSuperTypeArgument(parseReferenceTypeSignature(reader));
683683
case '*':
684-
return UNKNOWN_TYPE_ARGUMENT;
684+
return WILDCARD_TYPE_ARGUMENT;
685685
default:
686686
// Unread 'c'
687687
reader.index--;

src/main/java/org/jd/core/v1/service/fragmenter/javasyntaxtojavafragment/visitor/TypeVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public void visit(GenericType type) {
209209
}
210210

211211
@Override
212-
public void visit(UnknownTypeArgument type) {
212+
public void visit(WildcardTypeArgument type) {
213213
tokens.add(TextToken.QUESTIONMARK);
214214
}
215215

0 commit comments

Comments
 (0)