Package spoon.support.visitor
Interface GenericTypeAdapter
- All Known Implementing Classes:
ClassTypingContext
,MethodTypingContext
public interface GenericTypeAdapter
Provides adapting of generic types from one scope to another scope.
-
Method Summary
Modifier and TypeMethodDescriptionadaptType(CtTypeInformation type)
adapts `type` to theCtTypeReference
of the scope of thisGenericTypeAdapter
This mapping function is able to resolveCtTypeParameter
of:
A) input type or any super class or any enclosing class of input type or it's super class
B) super interfaces of input type or super interfaces of it's super classes.
The type reference is adapted recursive including all it's actual type arguments and bounds.
-
Method Details
-
getAdaptationScope
CtFormalTypeDeclarer getAdaptationScope()- Returns:
- the scope of this type adapter
-
adaptType
adapts `type` to theCtTypeReference
of the scope of thisGenericTypeAdapter
This mapping function is able to resolveCtTypeParameter
of:
A) input type or any super class or any enclosing class of input type or it's super class
B) super interfaces of input type or super interfaces of it's super classes.
The type reference is adapted recursive including all it's actual type arguments and bounds.- Parameters:
type
- to be adapted type- Returns:
CtTypeReference
adapted to scope of thisClassTypingContext
or null if type cannot be adapted to this `scope`.
-
getEnclosingGenericTypeAdapter
GenericTypeAdapter getEnclosingGenericTypeAdapter()- Returns:
- the
GenericTypeAdapter
, which adapts generic types of enclosing type
-