protected TypeMirror binaryPromotedType(TypeMirror left,TypeMirror right){
  if (TypesUtils.isBoxedPrimitive(left)) {
    left=types.unboxedType(left);
  }
  if (TypesUtils.isBoxedPrimitive(right)) {
    right=types.unboxedType(right);
  }
  TypeKind promotedTypeKind=TypesUtils.widenedNumericType(left,right);
  return types.getPrimitiveType(promotedTypeKind);
}

protected TypeMirror binaryPromotedType ( TypeMirror left , TypeMirror right ) { if ( TypesUtils . isBoxedPrimitive ( left ) ) { left = types . unboxedType ( left ) ; } if ( TypesUtils . isBoxedPrimitive ( right ) ) { right = types . unboxedType ( right ) ; } TypeKind promotedTypeKind = TypesUtils . widenedNumericType ( left , right ) ; return types . getPrimitiveType ( promotedTypeKind ) ; }
compute the type to which two numeric types must be promoted before performing a binary numeric operation on them . the input types must both be numeric and the output type is primitive .
