Lombok - v0.11.2

lombok.javac
Class Javac

java.lang.Object
  extended by lombok.javac.Javac

public class Javac
extends Object

Container for static utility methods relevant to lombok's operation on javac.


Method Summary
static Object calculateGuess(com.sun.tools.javac.tree.JCTree.JCExpression expr)
          Turns an expression into a guessed intended literal.
static int getCtcInt(Class<?> ctcLocation, String identifier)
          Retrieves a compile time constant of type int from the specified class location.
static boolean isPrimitive(com.sun.tools.javac.tree.JCTree.JCExpression ref)
          Checks if the given expression (that really ought to refer to a type expression) represents a primitive type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isPrimitive

public static boolean isPrimitive(com.sun.tools.javac.tree.JCTree.JCExpression ref)
Checks if the given expression (that really ought to refer to a type expression) represents a primitive type.


calculateGuess

public static Object calculateGuess(com.sun.tools.javac.tree.JCTree.JCExpression expr)
Turns an expression into a guessed intended literal. Only works for literals, as you can imagine. Will for example turn a TrueLiteral into 'Boolean.valueOf(true)'.


getCtcInt

public static int getCtcInt(Class<?> ctcLocation,
                            String identifier)
Retrieves a compile time constant of type int from the specified class location. Solves the problem of compile time constant inlining, resulting in lombok having the wrong value (javac compiler changes private api constants from time to time)

Parameters:
ctcLocation - location of the compile time constant
identifier - the name of the field of the compile time constant.

Lombok - v0.11.2

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