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 theCtTypeReferenceof the scope of thisGenericTypeAdapterThis mapping function is able to resolveCtTypeParameterof:
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 theCtTypeReferenceof the scope of thisGenericTypeAdapterThis mapping function is able to resolveCtTypeParameterof:
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:
CtTypeReferenceadapted to scope of thisClassTypingContextor null if type cannot be adapted to this `scope`.
-
getEnclosingGenericTypeAdapter
GenericTypeAdapter getEnclosingGenericTypeAdapter()- Returns:
- the
GenericTypeAdapter, which adapts generic types of enclosing type
-