List of usage examples for java.lang RuntimeException RuntimeException
public RuntimeException(Throwable cause)
From source file:Main.java
public static final void throwException(final Exception e) { if ((e != null) && (e instanceof RuntimeException)) throw (RuntimeException) e; else/*from ww w . java2 s. c om*/ throw new RuntimeException(e); }
From source file:Main.java
public static java.lang.CharSequence commaEllipsize(java.lang.CharSequence text, android.text.TextPaint p, float avail, java.lang.String oneMore, java.lang.String more) { throw new RuntimeException("Stub!"); }
From source file:Main.java
public static void checkGLThread(String error) { if (Looper.getMainLooper() == Looper.myLooper()) { throw new RuntimeException(error); }/*from www . j av a2 s . co m*/ }
From source file:Main.java
public static <K, V> Map<K, V> zipMap(final List<? extends K> keys, final List<? extends V> values) { if (keys.size() != values.size()) { throw new RuntimeException("List's size must be equals!"); }/* w w w . j av a 2 s . c o m*/ final int size = keys.size(); final Map<K, V> out = new HashMap<K, V>(); for (int i = 0; i < size; ++i) { out.put(keys.get(i), values.get(i)); } return out; }
From source file:Main.java
public static void checkMainThread(String error) { if (Looper.getMainLooper() != Looper.myLooper()) { throw new RuntimeException(error); }//from ww w . ja va 2 s . co m }
From source file:Main.java
public static String getDexClassName(String dottedClassName) { if (dottedClassName == null || dottedClassName.isEmpty()) throw new RuntimeException("Empty class name detected"); String slashedName = dottedClassName.replace('.', '/'); if (slashedName.startsWith("L") && slashedName.endsWith(";")) return slashedName; return "L" + slashedName + ";"; }
From source file:Main.java
public static Drawable getTintedDrawable(Resources res, Resources.Theme theme, int id, int tintAttrId) { throw new RuntimeException("Stub!"); }
From source file:Main.java
private static void throwRuntimeException(Throwable throwable) { if (throwable instanceof RuntimeException) { throw (RuntimeException) throwable; } else {//from w ww. j a v a2 s . c om throw new RuntimeException(throwable); } }
From source file:Main.java
public static android.view.animation.LayoutAnimationController loadLayoutAnimation( android.content.Context context, int id) throws android.content.res.Resources.NotFoundException { throw new RuntimeException("Stub!"); }
From source file:Main.java
public static void sleep(long milliseconds) { try {//from w ww . j av a 2 s. c om Thread.sleep(milliseconds); } catch (InterruptedException e) { throw new RuntimeException(e); } }