001 // Copyright 2010 Waterken Inc. under the terms of the MIT X license
002 // found at http://www.opensource.org/licenses/mit-license.html
003 package org.ref_send.brand;
004
005 import java.io.Serializable;
006
007 import org.joe_e.Powerless;
008 import org.ref_send.deserializer;
009 import org.ref_send.name;
010
011 /**
012 * Signals a {@link Brand} mismatch.
013 */
014 public class
015 WrongBrand extends ClassCastException implements Powerless, Serializable {
016 static private final long serialVersionUID = 1L;
017
018 /**
019 * expected brand
020 */
021 public final Brand<?> expected;
022
023 /**
024 * actual brand
025 */
026 public final Brand<?> actual;
027
028 /**
029 * Constructs an instance.
030 * @param expected {@link #expected}
031 * @param actual {@link #actual}
032 */
033 public @deserializer
034 WrongBrand(@name("expected") final Brand<?> expected,
035 @name("actual") final Brand<?> actual) {
036 this.expected = expected;
037 this.actual = actual;
038 }
039 }