- org.codehaus.groovy.transform.trait.TraitASTTransformation
 
    
        - 
            
                - All Implemented Interfaces and Traits:
 
                - CompilationUnitAware
 
            
            
            
            
@GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS)
public class TraitASTTransformation
extends AbstractASTTransformation
     Handles generation of code for the traits (trait keyword is equivalent to using the
- Trait:
 - annotation).
 A class annotated with
 
- Trait:
 - will generate, instead:
 
 - an interface with the same name
 
 - a utility inner class that will be used by the compiler to implement the trait
 
 - potentially a utility inner class to assist with implementing trait fields
 
 
 
 - Authors:
 - Cedric Champeau
 
           
    
 
    
        - 
        
        
        
        
        
        
            
        
        
        
        
        
        
        
        
        
            
            - 
                    
Methods Summary
                    
                    
                        Methods 
                        
                            | Type Params | 
                            Return Type | 
                            Name and description | 
                        
                        
                        
                             | 
                            void | 
                            setCompilationUnit(org.codehaus.groovy.control.CompilationUnit unit)
  | 
                        
                        
                        
                             | 
                            void | 
                            visit(ASTNode[] nodes, org.codehaus.groovy.control.SourceUnit source)
  | 
                        
                        
                    
                   
               
            
            - 
                    
Inherited Methods Summary
                    
                    
                        Inherited Methods 
                        
                            | Methods inherited from class | 
                            Name | 
                        
                        
                        
                            class AbstractASTTransformation | 
                            addError, checkIncludeExclude, checkIncludeExclude, checkIncludeExcludeUndefinedAware, checkIncludeExcludeUndefinedAware, checkNotInterface, checkPropertyList, checkPropertyList, checkPropertyList, copyAnnotatedNodeAnnotations, deemedInternalName, getAnnotationName, getClassList, getMemberClassList, getMemberClassValue, getMemberClassValue, getMemberIntValue, getMemberList, getMemberStringList, getMemberStringValue, getMemberStringValue, getMemberValue, hasAnnotation, init, memberHasValue, nonGeneric, shouldSkip, shouldSkip, shouldSkipOnDescriptor, shouldSkipOnDescriptorUndefinedAware, shouldSkipUndefinedAware, shouldSkipUndefinedAware, tokenize | 
                        
                        
                            class Object | 
                            wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll | 
                        
                    
                   
               
                
        
        
     
    
 
    
        - 
           
            
            
            
                - 
                    
                
                    
Field Detail
                    
                        
                        
                            - 
                                
public static final String DO_DYNAMIC
                                
                             
                        
                    
                        
                        
                            - 
                                
public static final String POST_TYPECHECKING_REPLACEMENT
                                
                             
                        
                    
                 
            
            
            
            
            
            
            
            
                - 
                    
                
                    
Method Detail
                    
                        
                        
                            - 
                                
public void setCompilationUnit(org.codehaus.groovy.control.CompilationUnit unit)
                                
                             
                        
                    
                        
                        
                            - 
                                
public void visit(ASTNode[] nodes, org.codehaus.groovy.control.SourceUnit source)
                                
                             
                        
                    
                 
            
            
         
    
 
    
    
    Copyright © 2003-2018 The Apache Software Foundation. All rights reserved.