Lombok - v0.10.8

lombok.eclipse
Class TransformEclipseAST

java.lang.Object
  extended by lombok.eclipse.TransformEclipseAST

public class TransformEclipseAST
extends Object

Entry point for the Eclipse Parser patch that lets lombok modify the Abstract Syntax Tree as generated by Eclipse's parser implementations. This class is injected into the appropriate OSGi ClassLoader and can thus use any classes that belong to org.eclipse.jdt.(apt.)core. Note that, for any Method body, if Bit24 is set, the Eclipse parser has been patched to never attempt to (re)parse it. You should set Bit24 on any MethodDeclaration object you inject into the AST: methodDeclaration.bits |= ASTNode.Bit24; //0x800000

Author:
rzwitserloot, rspilker

Field Summary
static boolean disableLombok
           
 
Constructor Summary
TransformEclipseAST(EclipseAST ast)
           
 
Method Summary
static EclipseAST getAST(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration ast, boolean forceRebuild)
           
 void go()
          First handles all lombok annotations except PrintAST, then calls all non-annotation based handlers.
static void transform_swapped(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration ast, org.eclipse.jdt.internal.compiler.parser.Parser parser)
           
static void transform(org.eclipse.jdt.internal.compiler.parser.Parser parser, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration ast)
          This method is called immediately after Eclipse finishes building a CompilationUnitDeclaration, which is the top-level AST node when Eclipse parses a source file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

disableLombok

public static boolean disableLombok
Constructor Detail

TransformEclipseAST

public TransformEclipseAST(EclipseAST ast)
Method Detail

transform_swapped

public static void transform_swapped(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration ast,
                                     org.eclipse.jdt.internal.compiler.parser.Parser parser)

getAST

public static EclipseAST getAST(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration ast,
                                boolean forceRebuild)

transform

public static void transform(org.eclipse.jdt.internal.compiler.parser.Parser parser,
                             org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration ast)
This method is called immediately after Eclipse finishes building a CompilationUnitDeclaration, which is the top-level AST node when Eclipse parses a source file. The signature is 'magic' - you should not change it! Eclipse's parsers often operate in diet mode, which means many parts of the AST have been left blank. Be ready to deal with just about anything being null, such as the Statement[] arrays of the Method AST nodes.

Parameters:
parser - The Eclipse parser object that generated the AST. Not actually used; mostly there to satisfy parameter rules for lombok.patcher scripts.
ast - The AST node belonging to the compilation unit (java speak for a single source file).

go

public void go()
First handles all lombok annotations except PrintAST, then calls all non-annotation based handlers. then handles any PrintASTs.


Lombok - v0.10.8

Copyright © 2009-2011 The Project Lombok Authors, licensed under the MIT licence.