private void boxing(ITypeBinding requestedBinding, ITypeBinding valueBinding) {
String requestedTypeName = requestedBinding.getQualifiedName();
if ("java.lang.Object".equals(requestedTypeName)) { //$NON-NLS-1$
switch (valueBinding.getBinaryName().charAt(0)) {
case 'I':
push(new SendStaticMessage(
"java.lang.Integer", "valueOf", "(I)Ljava/lang/Integer;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case 'C':
push(new SendStaticMessage(
"java.lang.Character", "valueOf", "(C)Ljava/lang/Character;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case 'B':
push(new SendStaticMessage(
"java.lang.Byte", "valueOf", "(B)Ljava/lang/Byte;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case 'S':
push(new SendStaticMessage(
"java.lang.Short", "valueOf", "(S)Ljava/lang/Short;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case 'J':
push(new SendStaticMessage(
"java.lang.Long", "valueOf", "(J)Ljava/lang/Long;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case 'F':
push(new SendStaticMessage(
"java.lang.Float", "valueOf", "(F)Ljava/lang/Float;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case 'D':
push(new SendStaticMessage(
"java.lang.Double", "valueOf", "(D)Ljava/lang/Double;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case 'Z':
push(new SendStaticMessage(
"java.lang.Boolean", "valueOf", "(Z)Ljava/lang/Boolean;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
}
} else if ("java.lang.Integer".equals(requestedTypeName)) { //$NON-NLS-1$
push(new SendStaticMessage(requestedTypeName,
"valueOf", "(I)Ljava/lang/Integer;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
} else if ("java.lang.Character".equals(requestedTypeName)) { //$NON-NLS-1$
push(new SendStaticMessage(requestedTypeName,
"valueOf", "(C)Ljava/lang/Character;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
} else if ("java.lang.Byte".equals(requestedTypeName)) { //$NON-NLS-1$
push(new SendStaticMessage(requestedTypeName,
"valueOf", "(B)Ljava/lang/Byte;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
} else if ("java.lang.Short".equals(requestedTypeName)) { //$NON-NLS-1$
push(new SendStaticMessage(requestedTypeName,
"valueOf", "(S)Ljava/lang/Short;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
} else if ("java.lang.Long".equals(requestedTypeName)) { //$NON-NLS-1$
push(new SendStaticMessage(requestedTypeName,
"valueOf", "(J)Ljava/lang/Long;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
} else if ("java.lang.Float".equals(requestedTypeName)) { //$NON-NLS-1$
push(new SendStaticMessage(requestedTypeName,
"valueOf", "(F)Ljava/lang/Float;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
} else if ("java.lang.Double".equals(requestedTypeName)) { //$NON-NLS-1$
push(new SendStaticMessage(requestedTypeName,
"valueOf", "(D)Ljava/lang/Double;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
} else if ("java.lang.Boolean".equals(requestedTypeName)) { //$NON-NLS-1$
push(new SendStaticMessage(requestedTypeName,
"valueOf", "(Z)Ljava/lang/Boolean;", 1, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
}
}