Lombok - v0.9.3

lombok.eclipse
Class Eclipse

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

public class Eclipse
extends java.lang.Object


Field Summary
static int ECLIPSE_DO_NOT_TOUCH_FLAG
          Eclipse's Parser class is instrumented to not attempt to fill in the body of any method or initializer or field initialization if this flag is set.
 
Method Summary
static boolean annotationTypeMatches(java.lang.Class<? extends java.lang.annotation.Annotation> type, EclipseNode node)
          Checks if the provided annotation type is likely to be the intended type for the given annotation node.
static org.eclipse.jdt.internal.compiler.ast.Annotation copyAnnotation(org.eclipse.jdt.internal.compiler.ast.Annotation annotation, org.eclipse.jdt.internal.compiler.ast.ASTNode source)
           
static org.eclipse.jdt.internal.compiler.ast.Annotation[] copyAnnotations(org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations1, org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations2, org.eclipse.jdt.internal.compiler.ast.ASTNode source)
           
static org.eclipse.jdt.internal.compiler.ast.Annotation[] copyAnnotations(org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations, org.eclipse.jdt.internal.compiler.ast.ASTNode source)
           
static org.eclipse.jdt.internal.compiler.ast.TypeReference copyType(org.eclipse.jdt.internal.compiler.ast.TypeReference ref, org.eclipse.jdt.internal.compiler.ast.ASTNode source)
          You can't share TypeReference objects or subtle errors start happening.
static org.eclipse.jdt.internal.compiler.ast.TypeParameter[] copyTypeParams(org.eclipse.jdt.internal.compiler.ast.TypeParameter[] params, org.eclipse.jdt.internal.compiler.ast.ASTNode source)
          You can't share TypeParameter objects or bad things happen; for example, one 'T' resolves differently from another 'T', even for the same T in a single class file.
static org.eclipse.jdt.internal.compiler.ast.TypeReference[] copyTypes(org.eclipse.jdt.internal.compiler.ast.TypeReference[] refs, org.eclipse.jdt.internal.compiler.ast.ASTNode source)
          Convenience method that creates a new array and copies each TypeReference in the source array via copyType(TypeReference, ASTNode).
static
<A extends java.lang.annotation.Annotation>
AnnotationValues<A>
createAnnotation(java.lang.Class<A> type, EclipseNode annotationNode)
          Provides AnnotationValues with the data it needs to do its thing.
static void error(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud, java.lang.String message)
          Generates an error in the Eclipse error log.
static void error(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud, java.lang.String message, java.lang.String bundleName)
          Generates an error in the Eclipse error log.
static void error(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud, java.lang.String message, java.lang.String bundleName, java.lang.Throwable error)
          Generates an error in the Eclipse error log.
static void error(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud, java.lang.String message, java.lang.Throwable error)
          Generates an error in the Eclipse error log.
static char[][] fromQualifiedName(java.lang.String typeName)
           
static org.eclipse.jdt.internal.compiler.ast.ASTNode getGeneratedBy(org.eclipse.jdt.internal.compiler.ast.ASTNode node)
           
static boolean isGenerated(org.eclipse.jdt.internal.compiler.ast.ASTNode node)
           
static org.eclipse.jdt.internal.compiler.ast.ASTNode setGeneratedBy(org.eclipse.jdt.internal.compiler.ast.ASTNode node, org.eclipse.jdt.internal.compiler.ast.ASTNode source)
           
static java.lang.String toQualifiedName(char[][] typeName)
          For 'speed' reasons, Eclipse works a lot with char arrays.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ECLIPSE_DO_NOT_TOUCH_FLAG

public static final int ECLIPSE_DO_NOT_TOUCH_FLAG
Eclipse's Parser class is instrumented to not attempt to fill in the body of any method or initializer or field initialization if this flag is set. Set it on the flag field of any method, field, or initializer you create!

See Also:
Constant Field Values
Method Detail

error

public static void error(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud,
                         java.lang.String message)
Generates an error in the Eclipse error log. Note that most people never look at it!


error

public static void error(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud,
                         java.lang.String message,
                         java.lang.Throwable error)
Generates an error in the Eclipse error log. Note that most people never look at it!


error

public static void error(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud,
                         java.lang.String message,
                         java.lang.String bundleName)
Generates an error in the Eclipse error log. Note that most people never look at it!


error

public static void error(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud,
                         java.lang.String message,
                         java.lang.String bundleName,
                         java.lang.Throwable error)
Generates an error in the Eclipse error log. Note that most people never look at it!


toQualifiedName

public static java.lang.String toQualifiedName(char[][] typeName)
For 'speed' reasons, Eclipse works a lot with char arrays. I have my doubts this was a fruitful exercise, but we need to deal with it. This turns [[java][lang][String]] into "java.lang.String".


fromQualifiedName

public static char[][] fromQualifiedName(java.lang.String typeName)

copyTypeParams

public static org.eclipse.jdt.internal.compiler.ast.TypeParameter[] copyTypeParams(org.eclipse.jdt.internal.compiler.ast.TypeParameter[] params,
                                                                                   org.eclipse.jdt.internal.compiler.ast.ASTNode source)
You can't share TypeParameter objects or bad things happen; for example, one 'T' resolves differently from another 'T', even for the same T in a single class file. Unfortunately the TypeParameter type hierarchy is complicated and there's no clone method on TypeParameter itself. This method can clone them.


copyTypes

public static org.eclipse.jdt.internal.compiler.ast.TypeReference[] copyTypes(org.eclipse.jdt.internal.compiler.ast.TypeReference[] refs,
                                                                              org.eclipse.jdt.internal.compiler.ast.ASTNode source)
Convenience method that creates a new array and copies each TypeReference in the source array via copyType(TypeReference, ASTNode).


copyType

public static org.eclipse.jdt.internal.compiler.ast.TypeReference copyType(org.eclipse.jdt.internal.compiler.ast.TypeReference ref,
                                                                           org.eclipse.jdt.internal.compiler.ast.ASTNode source)
You can't share TypeReference objects or subtle errors start happening. Unfortunately the TypeReference type hierarchy is complicated and there's no clone method on TypeReference itself. This method can clone them.


copyAnnotations

public static org.eclipse.jdt.internal.compiler.ast.Annotation[] copyAnnotations(org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations,
                                                                                 org.eclipse.jdt.internal.compiler.ast.ASTNode source)

copyAnnotations

public static org.eclipse.jdt.internal.compiler.ast.Annotation[] copyAnnotations(org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations1,
                                                                                 org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations2,
                                                                                 org.eclipse.jdt.internal.compiler.ast.ASTNode source)

copyAnnotation

public static org.eclipse.jdt.internal.compiler.ast.Annotation copyAnnotation(org.eclipse.jdt.internal.compiler.ast.Annotation annotation,
                                                                              org.eclipse.jdt.internal.compiler.ast.ASTNode source)

annotationTypeMatches

public static boolean annotationTypeMatches(java.lang.Class<? extends java.lang.annotation.Annotation> type,
                                            EclipseNode node)
Checks if the provided annotation type is likely to be the intended type for the given annotation node. This is a guess, but a decent one.


createAnnotation

public static <A extends java.lang.annotation.Annotation> AnnotationValues<A> createAnnotation(java.lang.Class<A> type,
                                                                                               EclipseNode annotationNode)
Provides AnnotationValues with the data it needs to do its thing.


getGeneratedBy

public static org.eclipse.jdt.internal.compiler.ast.ASTNode getGeneratedBy(org.eclipse.jdt.internal.compiler.ast.ASTNode node)

isGenerated

public static boolean isGenerated(org.eclipse.jdt.internal.compiler.ast.ASTNode node)

setGeneratedBy

public static org.eclipse.jdt.internal.compiler.ast.ASTNode setGeneratedBy(org.eclipse.jdt.internal.compiler.ast.ASTNode node,
                                                                           org.eclipse.jdt.internal.compiler.ast.ASTNode source)

Lombok - v0.9.3

Copyright © 2009 Reinier Zwitserloot and Roel Spilker, licensed under the MIT licence.