Package org.codehaus.groovy.antlr
Class PrimitiveHelper
java.lang.Object
org.codehaus.groovy.antlr.PrimitiveHelper
Default constants for primitive
ClassNodes.-
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressionReturns a zero orfalseconstant for one of the eight primitive types.
-
Method Details
-
getDefaultValueForPrimitive
Returns a zero orfalseconstant for one of the eight primitive types.int,long,double,float,char, andbooleankeep that primitive type.byteandshortare stored as those values, butConstantExpressiontypes them as the boxed class.voidand reference types returnnull.- Parameters:
type- the type whose default constant is required- Returns:
- that constant, or
nullwhentypeis not a numeric or boolean primitive
-