if ( !Serializable.class.isAssignableFrom( type ) ) {
throw new ObjenesisException( new NotSerializableException( type + " not serializable" ) );
}
if ( JVM_NAME.startsWith( SUN ) ) {
if ( VM_VERSION.startsWith( "1.3" ) ) {
return new Sun13SerializationInstantiator( type );
}
} else if ( JVM_NAME.startsWith( GNU ) ) {
return new GCJSerializationInstantiator( type );
}
return new ObjectStreamClassInstantiator( type );