public interface ViewpointAdapter
Viewpoint adaptation applies to member/field accesses, constructor invocations, method invocations, and type parameter bound instantiations.
Modifier and Type | Method and Description |
---|---|
void |
viewpointAdaptConstructor(AnnotatedTypeMirror receiverType,
ExecutableElement constructorElt,
AnnotatedTypeMirror.AnnotatedExecutableType constructorType)
Viewpoint adapts a constructor invocation.
|
void |
viewpointAdaptMember(AnnotatedTypeMirror receiverType,
Element memberElement,
AnnotatedTypeMirror memberType)
Viewpoint adapts a member/field access.
|
void |
viewpointAdaptMethod(AnnotatedTypeMirror receiverType,
ExecutableElement methodElt,
AnnotatedTypeMirror.AnnotatedExecutableType methodType)
Viewpoint adapts a method invocation.
|
void |
viewpointAdaptTypeParameterBounds(AnnotatedTypeMirror receiverType,
List<AnnotatedTypeParameterBounds> typeParameterBounds)
Viewpoint adapts a type parameter bound when being instantiated.
|
void viewpointAdaptMember(AnnotatedTypeMirror receiverType, Element memberElement, AnnotatedTypeMirror memberType)
Developer notes: When this method is invoked on a member/field with a type given by a type parameter, the type arguments are correctly substituted, and memberType is already in a good shape. Only annotations on the memberType should be replaced by the viewpoint adapted ones.
receiverType
- receiver type through which the member/field is accessed.memberElement
- element of the accessed member/field.memberType
- accessed type of the member/field. After the method returns, it will be
mutated to the viewpoint adapted result.void viewpointAdaptConstructor(AnnotatedTypeMirror receiverType, ExecutableElement constructorElt, AnnotatedTypeMirror.AnnotatedExecutableType constructorType)
receiverType
- receiver type through which a constructor is invoked.constructorElt
- element of the invoked constructor.constructorType
- invoked type of the constructor with type variables not substituted.
After the method returns, it will be mutated to the viewpoint adapted constructor type.void viewpointAdaptMethod(AnnotatedTypeMirror receiverType, ExecutableElement methodElt, AnnotatedTypeMirror.AnnotatedExecutableType methodType)
receiverType
- receiver type through which a method is invoked.methodElt
- element of the invoked method. Only used to determine whether this type
should be viewpoint adaptedmethodType
- invoked type of the method with type variables not substituted. After the
method returns, it will be mutated to the viewpoint adapted method type.void viewpointAdaptTypeParameterBounds(AnnotatedTypeMirror receiverType, List<AnnotatedTypeParameterBounds> typeParameterBounds)
receiverType
- receiver type through which the type parameter is instantiated.typeParameterBounds
- a list of type parameter bounds. After the method returns, it will
be mutated to the viewpoint adapted type parameter bounds.