Class TypeASTMapper<N>

java.lang.Object
org.checkerframework.afu.scenelib.el.TypeASTMapper<N>
Type Parameters:
N - common supertype of the AST nodes

public abstract class TypeASTMapper<N> extends Object
A TypeASTMapper traverses a client-maintained abstract syntax tree representing a type in parallel with an ATypeElement from the annotation scene library, indicating corresponding pairs of AST nodes and AElements to the client so the client can process them in some fashion.

To use TypeASTMapper, write a subclass for your particular AST. Implement getElementType(N), numTypeArguments(N), and getTypeArgument(N, int) so that the mapper knows how to traverse your AST; implement map(N, org.checkerframework.afu.scenelib.el.ATypeElement) to perform whatever processing you desire on each AST node and its corresponding AElement. Then, pass the root of your AST and the corresponding ATypeElement from your annotation scene to traverse(N, org.checkerframework.afu.scenelib.el.ATypeElement).

TypeASTMapper itself saves no state, but subclasses may save state if they wish.

ATypeElement objects that will be traversed