public static <V extends NSObject> NSDictionary<NSString, V> fromStringMap (Map<String, V> map) { Map<NSString, V> dictionary = new HashMap<>(); for (Map.Entry<String, V> entry : map.entrySet()) { dictionary.put(new NSString(entry.getKey()), entry.getValue()); } return new NSDictionary<NSString, V>(dictionary); }
@Override public void uncaughtException (Thread thread, Throwable ex) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); ex.printStackTrace(pw); pw.flush(); Foundation.log(sw.toString()); NSException exception = new NSException(ex.getClass().getName(), sw.toString(), new NSDictionary<>()); if (NSThread.getCurrentThread().isMainThread()) { exception.raise(); } else { long handler = getUncaughtExceptionHandler(); callUncaughtExceptionHandler(handler, exception); // We should never get to this line! } } });
public static <V extends NSObject> NSDictionary<NSString, V> fromStringMap (Map<String, V> map) { Map<NSString, V> dictionary = new HashMap<>(); for (Map.Entry<String, V> entry : map.entrySet()) { dictionary.put(new NSString(entry.getKey()), entry.getValue()); } return new NSDictionary<NSString, V>(dictionary); }
public static void logError(String errorID, String message, Throwable e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); pw.flush(); NSException exception = new NSException(e.getClass().getName(), sw.toString(), new NSDictionary<>()); logError(errorID, message, exception); } public static void logError(Throwable e) {
public static void logError(String errorID, String message, Throwable e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); pw.flush(); NSException exception = new NSException(e.getClass().getName(), sw.toString(), new NSDictionary<>()); logError(errorID, message, exception); } public static void logError(Throwable e) {
public static void logError(Throwable e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); pw.flush(); NSException exception = new NSException(e.getClass().getName(), sw.toString(), new NSDictionary<>()); logError(e.getClass().getName(), sw.toString(), exception); }
public static <V extends NSObject> NSDictionary<NSString, V> fromStringMap (Map<String, V> map) { Map<NSString, V> dictionary = new HashMap<>(); for (Map.Entry<String, V> entry : map.entrySet()) { dictionary.put(new NSString(entry.getKey()), entry.getValue()); } return new NSDictionary<NSString, V>(dictionary); }
public static void logError(Throwable e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); pw.flush(); NSException exception = new NSException(e.getClass().getName(), sw.toString(), new NSDictionary<>()); logError(e.getClass().getName(), sw.toString(), exception); }
@Override public void uncaughtException (Thread thread, Throwable ex) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); ex.printStackTrace(pw); pw.flush(); Foundation.log(sw.toString()); NSException exception = new NSException(ex.getClass().getName(), sw.toString(), new NSDictionary<>()); if (NSThread.getCurrentThread().isMainThread()) { exception.raise(); } else { long handler = getUncaughtExceptionHandler(); callUncaughtExceptionHandler(handler, exception); // We should never get to this line! } } });
@Override public void uncaughtException (Thread thread, Throwable ex) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); ex.printStackTrace(pw); pw.flush(); Foundation.log(sw.toString()); NSException exception = new NSException(ex.getClass().getName(), sw.toString(), new NSDictionary<>()); if (NSThread.getCurrentThread().isMainThread()) { exception.raise(); } else { long handler = getUncaughtExceptionHandler(); callUncaughtExceptionHandler(handler, exception); // We should never get to this line! } } });
textfield = textFieldHashMap.get(nativeTextField); color=nativeTextField.getMessageColor(); NSDictionary<NSString, ?> arr=new NSDictionary<>(NSAttributedStringAttribute.ForegroundColor.value() ,new UIColor(color.r,color.g,color.b,color.a),NSAttributedStringAttribute.Font.value() ,textfield.getFont());