public static PrimitiveData convertPrimitiveExprToData ( PrimitiveNode primitiveNode ) { if ( primitiveNode instanceof StringNode ) { return StringData . forValue ( ( ( StringNode ) primitiveNode ) . getValue ( ) ) ; } else if ( primitiveNode instanceof BooleanNode ) { return BooleanData . forValue ( ( ( BooleanNode ) primitiveNode ) . getValue ( ) ) ; } else if ( primitiveNode instanceof IntegerNode ) { return IntegerData . forValue ( ( ( IntegerNode ) primitiveNode ) . getValue ( ) ) ; } else if ( primitiveNode instanceof FloatNode ) { return FloatData . forValue ( ( ( FloatNode ) primitiveNode ) . getValue ( ) ) ; } else if ( primitiveNode instanceof NullNode ) { return NullData . INSTANCE ; } else { throw new IllegalArgumentException ( ) ; } }
Converts a primitive expression node into a primitive data object .