001package votorola.g.lang; // Copyright 2009, Michael Allan.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE.
002
003
004/** The null implementation of a catcher.  It does nothing.
005  */
006public @ThreadSafe final class Catcher00<S> implements Catcher<S>
007{
008
009    private Catcher00() {}
010
011
012
013    /** The single instance of Catcher00.
014      */
015      @SuppressWarnings( "unchecked" )
016    public static <S> Catcher00<S> i() { return (Catcher00<S>)instance; }
017
018
019
020   // - C a t c h e r --------------------------------------------------------------------
021
022
023    /** Does nothing.
024      */
025    public void catchError( S source, Error r ) {}
026
027
028
029    /** Does nothing.
030      */
031    public void catchException( S source, Exception x ) {}
032
033
034
035//////////////////////////////////////////////////////////////////////////////////////////
036// Last, so static fields above initialize, and are available during instantiation below
037
038
039    private static final Catcher00<Object> instance = new Catcher00<Object>();
040
041
042
043}