Griffon 1.2.0

org.codehaus.griffon.ast
[Java] Class ThreadingAwareASTTransformation

java.lang.Object
  org.codehaus.griffon.ast.AbstractASTTransformation
      org.codehaus.griffon.ast.ThreadingAwareASTTransformation

@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION)
public class ThreadingAwareASTTransformation
extends AbstractASTTransformation

Handles generation of code for the @ThreadingAware annotation.

Authors:
Andres Almiray


Field Summary
private static String CALLABLE

private static ClassNode CALLABLE_TYPE

private static String CLOSURE

private static ClassNode EXECUTOR_SERVICE_TYPE

private static ClassNode FUTURE_TYPE

private static Logger LOG

private static ClassNode MY_TYPE

private static String RUNNABLE

private static ClassNode RUNNABLE_TYPE

private static ClassNode THREADING_HANDLER_TYPE

private static ClassNode UITHREAD_MANAGER_TYPE

 
Fields inherited from class AbstractASTTransformation
APPLICATION_HOLDER_TYPE, COLLECTIONS_CLASS
 
Constructor Summary
ThreadingAwareASTTransformation()

 
Method Summary
static void apply(ClassNode classNode)

static boolean hasThreadingAwareAnnotation(AnnotatedNode node)

Convenience method to see if an annotated node is @ThreadingAware.

private static Expression uiThreadManagerInstance()

void visit(ASTNode[] nodes, SourceUnit source)

Handles the bulk of the processing, mostly delegating to other methods.

 
Methods inherited from class AbstractASTTransformation
addError, applicationInstance, checkNodesForAnnotationAndType, emptyMap, makeClassSafe, makeClassSafe, makeClassSafe, newClass
 

Field Detail

CALLABLE

private static final String CALLABLE


CALLABLE_TYPE

private static final ClassNode CALLABLE_TYPE


CLOSURE

private static final String CLOSURE


EXECUTOR_SERVICE_TYPE

private static final ClassNode EXECUTOR_SERVICE_TYPE


FUTURE_TYPE

private static final ClassNode FUTURE_TYPE


LOG

private static final Logger LOG


MY_TYPE

private static ClassNode MY_TYPE


RUNNABLE

private static final String RUNNABLE


RUNNABLE_TYPE

private static final ClassNode RUNNABLE_TYPE


THREADING_HANDLER_TYPE

private static ClassNode THREADING_HANDLER_TYPE


UITHREAD_MANAGER_TYPE

private static final ClassNode UITHREAD_MANAGER_TYPE


 
Constructor Detail

ThreadingAwareASTTransformation

ThreadingAwareASTTransformation()


 
Method Detail

apply

public static void apply(ClassNode classNode)


hasThreadingAwareAnnotation

public static boolean hasThreadingAwareAnnotation(AnnotatedNode node)
Convenience method to see if an annotated node is @ThreadingAware.
Parameters:
node - the node to check
Returns:
true if the node is an event publisher


uiThreadManagerInstance

private static Expression uiThreadManagerInstance()


visit

public void visit(ASTNode[] nodes, SourceUnit source)
Handles the bulk of the processing, mostly delegating to other methods.
Parameters:
nodes - the ast nodes
source - the source unit for the nodes


 

Groovy Documentation