Use bounded wildcards in API in constructors/final methods to make it more conventional and flexible
This commit is contained in:
@@ -17,10 +17,10 @@ public class AnnotationExprent extends Exprent {
|
|||||||
public static final int ANNOTATION_SINGLE_ELEMENT = 3;
|
public static final int ANNOTATION_SINGLE_ELEMENT = 3;
|
||||||
|
|
||||||
private final String className;
|
private final String className;
|
||||||
private final List<String> parNames;
|
private final List<? extends String> parNames;
|
||||||
private final List<Exprent> parValues;
|
private final List<? extends Exprent> parValues;
|
||||||
|
|
||||||
public AnnotationExprent(String className, List<String> parNames, List<Exprent> parValues) {
|
public AnnotationExprent(String className, List<? extends String> parNames, List<? extends Exprent> parValues) {
|
||||||
super(EXPRENT_ANNOTATION);
|
super(EXPRENT_ANNOTATION);
|
||||||
this.className = className;
|
this.className = className;
|
||||||
this.parNames = parNames;
|
this.parNames = parNames;
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import java.util.List;
|
|||||||
|
|
||||||
public class AssertExprent extends Exprent {
|
public class AssertExprent extends Exprent {
|
||||||
|
|
||||||
private final List<Exprent> parameters;
|
private final List<? extends Exprent> parameters;
|
||||||
|
|
||||||
public AssertExprent(List<Exprent> parameters) {
|
public AssertExprent(List<? extends Exprent> parameters) {
|
||||||
super(EXPRENT_ASSERT);
|
super(EXPRENT_ASSERT);
|
||||||
this.parameters = parameters;
|
this.parameters = parameters;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class InvocationExprent extends Exprent {
|
|||||||
public InvocationExprent(int opcode,
|
public InvocationExprent(int opcode,
|
||||||
LinkConstant cn,
|
LinkConstant cn,
|
||||||
List<PooledConstant> bootstrapArguments,
|
List<PooledConstant> bootstrapArguments,
|
||||||
ListStack<Exprent> stack,
|
ListStack<? extends Exprent> stack,
|
||||||
Set<Integer> bytecodeOffsets) {
|
Set<Integer> bytecodeOffsets) {
|
||||||
this();
|
this();
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class GeneralStatement extends Statement {
|
|||||||
type = Statement.TYPE_GENERAL;
|
type = Statement.TYPE_GENERAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GeneralStatement(Statement head, Collection<Statement> statements, Statement post) {
|
public GeneralStatement(Statement head, Collection<? extends Statement> statements, Statement post) {
|
||||||
|
|
||||||
this();
|
this();
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class SequenceStatement extends Statement {
|
|||||||
type = Statement.TYPE_SEQUENCE;
|
type = Statement.TYPE_SEQUENCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SequenceStatement(List<Statement> lst) {
|
public SequenceStatement(List<? extends Statement> lst) {
|
||||||
|
|
||||||
this();
|
this();
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class FastSparseSetFactory<E> {
|
|||||||
|
|
||||||
private int lastMask;
|
private int lastMask;
|
||||||
|
|
||||||
public FastSparseSetFactory(Collection<E> set) {
|
public FastSparseSetFactory(Collection<? extends E> set) {
|
||||||
|
|
||||||
int block = -1;
|
int block = -1;
|
||||||
int mask = -1;
|
int mask = -1;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class ListStack<T> extends ArrayList<T> {
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListStack(ArrayList<T> list) {
|
public ListStack(ArrayList<? extends T> list) {
|
||||||
super(list);
|
super(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user