public class GenericTypeCollection extends Object
| Constructor and Description |
|---|
GenericTypeCollection(GenericType[] genericTypes) |
| Modifier and Type | Method and Description |
|---|---|
GenericTypeCollection |
combineWith(GenericTypeCollection other)
Combines the generic type mappings of this GenericTypeCollection with the generic type mappings of the
other GenericTypeCollection. |
static GenericTypeCollection |
empty() |
boolean |
equals(Object o) |
GenericType |
get(int index) |
int |
getLength() |
String |
getNameFromType(SpecimenType type) |
SpecimenType |
getType(String name) |
int |
hashCode() |
String |
toString() |
public GenericTypeCollection(GenericType[] genericTypes)
public GenericType get(int index)
public SpecimenType getType(String name)
public String getNameFromType(SpecimenType type)
public static GenericTypeCollection empty()
public int getLength()
public GenericTypeCollection combineWith(GenericTypeCollection other)
other GenericTypeCollection.
Use case: when a non generic Class Foo extends a generic type Bar<T>, example:
Class Foo extends Bar<String>
The generic type mappings for Foo (none in this example) can then be combined with the generic type mappings for Bar<String>
If other contains an existing mapping in this then that mapping will be replaced (i.e. the mapping from other will be used).
other - the other GenericTypeCollection to combine withthis and otherCopyright © 2017. All rights reserved.