List of usage examples for java.lang ClassCastException ClassCastException
public ClassCastException(String s)
ClassCastException
with the specified detail message. From source file:com.digitalarx.android.ui.dialog.SamlWebViewDialog.java
@Override public void onAttach(Activity activity) { Log_OC.d(TAG, "onAttach"); super.onAttach(activity); try {//from w ww. j a va2 s. c om mSsoWebViewClientListener = (SsoWebViewClientListener) activity; mHandler = new Handler(); mWebViewClient = new SsoWebViewClient(activity, mHandler, mSsoWebViewClientListener); } catch (ClassCastException e) { throw new ClassCastException( activity.toString() + " must implement " + SsoWebViewClientListener.class.getSimpleName()); } }
From source file:com.ericbarnhill.arrayMath.MathArrayFloat1D.java
protected MathArrayFloat1D addC(Complex g) { throw new ClassCastException("Cannot add Complex number to double array"); }
From source file:com.ericbarnhill.arrayMath.MathArrayFloat2D.java
protected MathArrayFloat2D addC(Complex g) { throw new ClassCastException("Cannot add Complex number to double array"); }
From source file:com.androzic.route.RouteEdit.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); // This makes sure that the container activity has implemented // the callback interface. If not, it throws an exception try {// w ww . j av a 2s. c om waypointActionsCallback = (OnWaypointActionListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnWaypointActionListener"); } }
From source file:com.ericbarnhill.arrayMath.MathArrayFloat3D.java
protected MathArrayFloat3D addC(Complex g) { throw new ClassCastException("Cannot add Complex number to double array"); }
From source file:br.com.bioscada.apps.biotracks.fragments.ExportDialogFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from ww w .j av a 2s . c o m caller = (ExportCaller) activity; } catch (ClassCastException e) { throw new ClassCastException( activity.toString() + " must implement " + ExportCaller.class.getSimpleName()); } }
From source file:com.bexkat.feedlib.ItemListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from w w w. java2s . co m callback = (IndicatorCallback) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement IndicatorCallback"); } }
From source file:ca.mudar.mtlaucasou.BaseMapFragment.java
/** * Attach a listener./* w ww . java2s .c om*/ */ @Override public void onAttach(SupportActivity activity) { super.onAttach(activity); try { mListener = (OnMyLocationChangedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnMyLocationChangedListener"); } }
From source file:com.dabay6.android.apps.carlog.ui.base.fragments.BaseEditFragment.java
/** * {@inheritDoc}/*from www . j a v a2s . c o m*/ */ @Override public void onAttach(final Activity activity) { super.onAttach(activity); try { onEntityEditListener = (OnEntityEditListener) activity; } catch (final ClassCastException ex) { throw new ClassCastException(activity.toString() + " must implement OnEntityEditListener"); } }
From source file:com.royclarkson.springagram.GalleryPhotoListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from w w w . j av a 2s . c o m*/ this.galleryPhotoListFragmentListener = (GalleryPhotoListFragmentListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnPhotoSelectedListener"); } }