JaCIL Framework API

TypeMapper.MapConstant Method 

Converts the given primitive to the wrapped java equivalent for use in field constants or constant instructions.

public static object MapConstant(
   object source
);

Parameters

source
The source object to convert.

Return Value

The wrapped java object.

Remarks

This method is to return an appropriate type for the constant entry for a field definition. As such, for small integers, this will return a java.lang.Integer.

Exceptions

Exception Type Condition
TranslationException Thrown if there is a problem converting the source argument.

See Also

TypeMapper Class | JaCIL.Compiler.Util Namespace