FileDocCategorySizeDatePackage
InvalidTargetObjectTypeException.javaAPI DocJava SE 6 API5858Tue Jun 10 00:26:16 BST 2008javax.management.modelmbean

InvalidTargetObjectTypeException

public class InvalidTargetObjectTypeException extends Exception
Exception thrown when an invalid target object type is specified.

The serialVersionUID of this class is 1190536278266811217L.

since
1.5

Fields Summary
private static final long
oldSerialVersionUID
private static final long
newSerialVersionUID
private static final ObjectStreamField[]
oldSerialPersistentFields
private static final ObjectStreamField[]
newSerialPersistentFields
private static final long
serialVersionUID
private static final ObjectStreamField[]
serialPersistentFields
private static boolean
compat
Exception
exception
Constructors Summary
public InvalidTargetObjectTypeException()
Default constructor.

      super("InvalidTargetObjectTypeException: ");
      exception = null;
    
public InvalidTargetObjectTypeException(String s)
Constructor from a string.

param
s String value that will be incorporated in the message for this exception.

      super("InvalidTargetObjectTypeException: " + s);
      exception = null;
    
public InvalidTargetObjectTypeException(Exception e, String s)
Constructor taking an exception and a string.

param
e Exception that we may have caught to reissue as an InvalidTargetObjectTypeException. The message will be used, and we may want to consider overriding the printStackTrace() methods to get data pointing back to original throw stack.
param
s String value that will be incorporated in message for this exception.

      super("InvalidTargetObjectTypeException: " + 
            s +
            ((e != null)?("\n\t triggered by:" + e.toString()):""));
      exception = e;
    
Methods Summary
private voidreadObject(java.io.ObjectInputStream in)
Deserializes an {@link InvalidTargetObjectTypeException} from an {@link ObjectInputStream}.

      if (compat)
      {
        // Read an object serialized in the old serial form
        //
        ObjectInputStream.GetField fields = in.readFields();
	exception = (Exception) fields.get("relatedExcept", null);
	if (fields.defaulted("relatedExcept"))
        {
          throw new NullPointerException("relatedExcept");
        }
      }
      else
      {
        // Read an object serialized in the new serial form
        //
        in.defaultReadObject();
      }
    
private voidwriteObject(java.io.ObjectOutputStream out)
Serializes an {@link InvalidTargetObjectTypeException} to an {@link ObjectOutputStream}.

      if (compat)
      {
        // Serializes this instance in the old serial form
        //
        ObjectOutputStream.PutField fields = out.putFields();
	fields.put("relatedExcept", exception);
	fields.put("msgStr", ((exception != null)?exception.getMessage():""));
	out.writeFields();
      }
      else
      {
        // Serializes this instance in the new serial form
        //
        out.defaultWriteObject();
      }