| Type Params | Return Type | Name and description |
|---|---|---|
|
public static Expression |
getDefaultValueForPrimitive(ClassNode type)Returns a zero or false constant for one of the eight primitive types.
|
Returns a zero or false constant for one of the eight primitive types.
int, long, double, float, char, and
boolean keep that primitive type. byte and short are stored
as those values, but ConstantExpression types them as the boxed class.
void and reference types return null.
type - the type whose default constant is requirednull when type is not a numeric or boolean primitive