Package spoon.support.reflect.eval
Class EvalHelper
java.lang.Object
spoon.support.reflect.eval.EvalHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
Evaluates and converts CtExpression to their equivalent runtime objects eg "CtLiteral(3) + CtLiteral(4)" -> 7static Object
getCorrespondingRuntimeObject(CtExpression<?> value)
Returns the runtime object corresponding to the expression eg CtLiteral(3) -> 3static boolean
isKnownAtCompileTime(CtExpression<?> exp)
returns true if the expression is known at compile time Bonus method for @oscarlvp :-)
-
Method Details
-
convertElementToRuntimeObject
Evaluates and converts CtExpression to their equivalent runtime objects eg "CtLiteral(3) + CtLiteral(4)" -> 7 -
getCorrespondingRuntimeObject
Returns the runtime object corresponding to the expression eg CtLiteral(3) -> 3 -
isKnownAtCompileTime
returns true if the expression is known at compile time Bonus method for @oscarlvp :-)
-