FileDocCategorySizeDatePackage
InvalidTargetObjectTypeException.javaAPI DocJava SE 5 API5776Fri Aug 26 14:57:34 BST 2005javax.management.modelmbean

InvalidTargetObjectTypeException

public class InvalidTargetObjectTypeException extends Exception
Exception thrown when an invalid target object type is specified.
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();
      }