Class TypeArguments
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RichTypeDefstatic RichTypeDefGiven a reference to a generic class, determine a mapping between generic arguments definitions and instantiations.getGenericArgumentsMappings(ClassRef ref, TypeDef definition) Given a reference to a generic class, determine a mapping between generic arguments definitions and instantiations.
-
Field Details
-
ORIGINAL_TYPE_PARAMETER
-
-
Constructor Details
-
TypeArguments
public TypeArguments()
-
-
Method Details
-
apply
-
apply
-
getGenericArgumentsMappings
Given a reference to a generic class, determine a mapping between generic arguments definitions and instantiations.For example, given a definition of
interface Map<K,V> {...}and a referenceMap<String,Integer>, the mapping will be{K -> String, V -> Integer}.Raw references, that is, references that do not contain generic arguments (like
Map) are accepted and always return an empty result.However, if the reference does contain generic arguments, their count must be equal to the definition.
- Parameters:
ref- The class reference to evaluate. The corresponding definition will be loaded usingGetDefinition
-
getGenericArgumentsMappings
Given a reference to a generic class, determine a mapping between generic arguments definitions and instantiations.For example, given a definition of
interface Map<K,V> {...}and a referenceMap<String,Integer>, the mapping will be{K -> String, V -> Integer}.Raw references, that is, references that do not contain generic arguments (like
Map) are accepted and always return an empty result.However, if the reference does contain generic arguments, their count must be equal to the definition.
- Parameters:
ref- The class reference to evaluate.definition- The corresponding definition
-