[Checkers] Fwd: State-Type Prototype
Mahmood Ali
mahmood at MIT.EDU
Mon Sep 22 09:51:31 EDT 2008
FYI
Begin forwarded message:
> From: Daniel Wand <daniel.wand at gmail.com>
> Date: September 22, 2008 6:54:09 AM EDT
> To: Mahmood Ali <mahmood at MIT.EDU>
> Subject: Re: State-Type Prototype
>
> Hey,
>
> Thanks! I am sorry that I did not reply earlier but I did not have
> internet access last week.
>
>>
>> There is basically one class: StatefulAnnotatedTypeFactory, that
>> contains StatefulFlow. StatefulFlow changes the state of the call
>> site upon method invocations of methods annotated with
>> '@ChangeStatusTo'.
>
> Ok, but I dont really understand how this is done.
> What does getCallSite do?
>
> And in visitMethodInvocation: I do not understand what the try/catch
> block does:
> Name newStatusName = null;
> try { method.getAnnotation(ChangeStatusTo.class).value(); }
> catch (MirroredTypeException e) {
> newStatusName =
> TypesUtils.getQualifiedName((DeclaredType)e.getTypeMirror());
> }
> AnnotationMirror newStatusAnno =
> annoUtils.fromName(newStatusName);
>
>>
>> Please note the limitations due to aliasing, as noted in
>> TestState.java example.
> Ok
>
> Thanks again,
> Daniel
>
More information about the checkers
mailing list